server/migractions.py
changeset 9421 6b673cb4d3b6
parent 9375 8e88576787c3
child 9478 2d7521881d3d
child 9588 fe267b7336f3
equal deleted inserted replaced
9420:3809e93c33b8 9421:6b673cb4d3b6
   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"""