dbptk-developer icon indicating copy to clipboard operation
dbptk-developer copied to clipboard

Support default schema override when converting from single-schema to multi-schema databases

Open chalkos opened this issue 8 years ago • 2 comments

Necessity: When converting from a single schema database (like MySQL) to a multi-schema database (like PostgreSQL), the tables are created in the default schema (for PostgreSQL this is the public schema). This does not allow (for example) multiple MySQL databases to be exported to multiple PostgreSQL schemas (on the same PostgreSQL database).

Feature: Allow overriding the target schema in these cases so that many single-schema databases can be converted into a single multi-schema database (each saved in its own schema, avoiding any conflicts).

Possible spec:

  1. Convert mysql "sakila" example database to postgresql schema named test1
  2. Convert mysql "sakila" example database to postgresql schema named test2

Expected effects:

  • No conflicts occur during conversion
  • PostgreSQL public schema should be untouched
  • PostgreSQL test1 schema should contain the "sakila" example database
  • PostgreSQL test1 schema should be equal to PostgreSQL test2 schema

chalkos avatar Mar 21 '16 10:03 chalkos

Will this cover also the Oracle specifics? There are schemas as well but with a different purpose. For archival use we may want to archive tables of a certain application and they could be available in a certain schema. And maybe some other schema in the same database will hold records which are not interesting for the archives.

BorisDomajnko avatar Mar 21 '16 12:03 BorisDomajnko

This will treat Oracle databases as any other multi-schema databases. Allowing you to choose the target schema when converting a single schema to oracle.

For archival use we may want to archive tables of a certain application and they could be available in a certain schema. And maybe some other schema in the same database will hold records which are not interesting for the archives.

I think this is already provided by the List tables module (and is a different feature than the one described in the issue description). Feel free to create a new issue if you believe that your use-case is not already covered by existing functionality.

chalkos avatar Mar 21 '16 12:03 chalkos