Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-ALPHA2
-
Fix Version/s: 2.0-ALPHA3
-
Component/s: Tools
-
Security Level: All
-
Labels:None
Description
Currently drop schema infers from the current metadata model which tables have to be dropped.
However when your schema changes and you then want to regenerate the database the tables may have changed and SQL errors like "table does not exist" may occur.
Therefore I propose to extend dropSchema() to have four modes:
- "metadata" - Drop schema of the current metadata model.
- "force-metadata" - Drop schema of the current metadata model, even if some tables don't exist.
- "database" - Drop all tables of a database.
- "orphans" - Drop all tables that are in the database but not in the metadata model.
Issue Links
- is duplicated by
-
DDC-99
Add dropOrphanedTables() command to SchemaTool
-
Because of Bug
DDC-98the orphans command is a bit dangerous as of now, but the rest will be implemented for now. There are other problems also with orphans.