Project

General

Profile

Actions

Bug #1371

closed

Wt::Dbo::Session.dropTables() fails on Postgres backend due to foreign key relations

Added by Anonymous over 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Michael Vilsker
Target version:
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.

Actions #1

Updated by Koen Deforche over 11 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

Actions #2

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions #3

Updated by Mark Petryk over 5 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

Also available in: Atom PDF