equal
deleted
inserted
replaced
1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
259 # schema entities and relations tables |
259 # schema entities and relations tables |
260 # can't skip entities table even if system source doesn't support them, |
260 # can't skip entities table even if system source doesn't support them, |
261 # they are used sometimes by generated sql. Keeping them empty is much |
261 # they are used sometimes by generated sql. Keeping them empty is much |
262 # simpler than fixing this... |
262 # simpler than fixing this... |
263 schemasql = sqlschema(schema, driver) |
263 schemasql = sqlschema(schema, driver) |
264 #skip_entities=[str(e) for e in schema.entities() |
264 failed = sqlexec(schemasql, execute, pbtitle=_title) |
265 # if not repo.system_source.support_entity(str(e))]) |
|
266 failed = sqlexec(schemasql, execute, pbtitle=_title, delimiter=';;') |
|
267 if failed: |
265 if failed: |
268 print('The following SQL statements failed. You should check your schema.') |
266 print('The following SQL statements failed. You should check your schema.') |
269 print(failed) |
267 print(failed) |
270 raise Exception('execution of the sql schema failed, you should check your schema') |
268 raise Exception('execution of the sql schema failed, you should check your schema') |
271 sqlcursor.close() |
269 sqlcursor.close() |