diff options
Diffstat (limited to 'odb/relational/pgsql')
-rw-r--r-- | odb/relational/pgsql/schema.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/odb/relational/pgsql/schema.cxx b/odb/relational/pgsql/schema.cxx index f127b95..1cf57f1 100644 --- a/odb/relational/pgsql/schema.cxx +++ b/odb/relational/pgsql/schema.cxx @@ -29,7 +29,16 @@ namespace relational virtual void traverse (sema_rel::table& t, bool migration) { - // For PostgreSQL we use the CASCADE clause to drop foreign keys. + // For migration drop foreign keys explicitly in pre-migration. + // + if (migration) + { + base::traverse (t, migration); + return; + } + + // For schema creation we use the CASCADE clause to drop foreign + // keys. // if (pass_ != 2) return; |