Project

General

Profile

Bug #1371

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

Added by Anonymous about 8 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
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.

#1

Updated by Koen Deforche almost 8 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

#2

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed
#3

Updated by Mark Petryk almost 2 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

Also available in: Atom PDF