Project

General

Profile

Actions

Bug #1371

closed
MV

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

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

Added by Anonymous about 14 years ago. Updated almost 8 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.

KD Updated by Koen Deforche over 13 years ago Actions #1

  • 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

KD Updated by Koen Deforche over 13 years ago Actions #2

  • Status changed from Resolved to Closed

MP Updated by Mark Petryk almost 8 years ago Actions #3

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: PDF Atom