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