385 else: |
385 else: |
386 directory = osp.join(self.config.cube_dir(cube), 'schema') |
386 directory = osp.join(self.config.cube_dir(cube), 'schema') |
387 sql_scripts = glob(osp.join(directory, '*.%s.sql' % driver)) |
387 sql_scripts = glob(osp.join(directory, '*.%s.sql' % driver)) |
388 for fpath in sql_scripts: |
388 for fpath in sql_scripts: |
389 print '-> installing', fpath |
389 print '-> installing', fpath |
390 try: |
390 failed = sqlexec(open(fpath).read(), self.session.system_sql, False, |
391 sqlexec(open(fpath).read(), self.session.system_sql, False, |
391 delimiter=';;') |
392 delimiter=';;') |
392 if failed: |
393 except Exception as exc: |
393 print '-> ERROR, skipping', fpath |
394 print '-> ERROR:', exc, ', skipping', fpath |
|
395 |
394 |
396 # schema synchronization internals ######################################## |
395 # schema synchronization internals ######################################## |
397 |
396 |
398 def _synchronize_permissions(self, erschema, teid): |
397 def _synchronize_permissions(self, erschema, teid): |
399 """permission synchronization for an entity or relation type""" |
398 """permission synchronization for an entity or relation type""" |