diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-15 12:46:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-15 12:46:09 +0200 |
commit | 51956f409ec7ebea8b6790b0c5d4f0b51513d683 (patch) | |
tree | 66f30e68fa3c8080d0d3d8d50c30e11914fc82b9 /odb/relational/pgsql | |
parent | d9ea777539b166c7347c44a6b7784626405bc029 (diff) |
Cleanup polymorphic base tables when dropping derived one
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; |