Actions
Bug #1371
closedWt::Dbo::Session.dropTables() fails on Postgres backend due to foreign key relations
Start date:
07/26/2012
Due date:
% Done:
0%
Estimated time:
Description
Was asked to create issue for this, see http://redmine.webtoolkit.eu/boards/2/topics/4140.
To reproduce: setup relations between some tables (with Postgres backend) and try to drop the database schema using Wt::Dbo::Session.dropTables(). The following exception will be thrown:
ERROR: cannot drop table <tablename> because other objects depend on it
DETAIL: constraint fk_<foreigntablename>_<tablename> on table <foreigntablename> depends on table <tablename>
HINT: Use DROP ... CASCADE to drop the dependent objects too.
Let me know if you need more information.
Updated by Koen Deforche almost 12 years ago
- Status changed from New to Resolved
- Assignee set to Michael Vilsker
- Target version set to 3.3.0
Hey,
We are now creating and dropping the constraints separately to avoid issues like these, but also circular constraints.
Regards,
koen
Updated by Koen Deforche almost 12 years ago
- Status changed from Resolved to Closed
Updated by Mark Petryk almost 6 years ago
Adding 'cascade' to the 'drop table' function can clear up some issues here.
Please refer to this post:
https://redmine.webtoolkit.eu/boards/2/topics/11486
Actions