server/__init__.py
branchstable
changeset 9333 22423634d06d
parent 9325 a4fc09836329
child 9340 b1e933b0e850
equal deleted inserted replaced
9332:7a5d46db5c36 9333:22423634d06d
   203     # they are used sometimes by generated sql. Keeping them empty is much
   203     # they are used sometimes by generated sql. Keeping them empty is much
   204     # simpler than fixing this...
   204     # simpler than fixing this...
   205     schemasql = sqlschema(schema, driver)
   205     schemasql = sqlschema(schema, driver)
   206     #skip_entities=[str(e) for e in schema.entities()
   206     #skip_entities=[str(e) for e in schema.entities()
   207     #               if not repo.system_source.support_entity(str(e))])
   207     #               if not repo.system_source.support_entity(str(e))])
   208     sqlexec(schemasql, execute, pbtitle=_title, delimiter=';;')
   208     failed = sqlexec(schemasql, execute, pbtitle=_title, delimiter=';;')
       
   209     if failed:
       
   210         print 'The following SQL statements failed. You should check your schema.'
       
   211         print failed
       
   212         raise Exception('execution of the sql schema failed, you should check your schema')
   209     sqlcursor.close()
   213     sqlcursor.close()
   210     sqlcnx.commit()
   214     sqlcnx.commit()
   211     sqlcnx.close()
   215     sqlcnx.close()
   212     session = repo.internal_session()
   216     session = repo.internal_session()
   213     # insert entity representing the system source
   217     # insert entity representing the system source