phinx-migrations-generator icon indicating copy to clipboard operation
phinx-migrations-generator copied to clipboard

Generate DB from schema.php file

Open afaneca opened this issue 1 year ago • 0 comments

Consider a situation where a schema.php file is already present, with all the correct entities and attributes, but the database is still empty. If I currently choose to generate a new migration file, your software uses the database as the single source of truth, so the generated migration file will have instructions to drop all of the tables present in schema.php (since they are not present in the database).

Is there any flag I can use to choose the schema.php file as the source of truth and generate from that a migration file that, in turn, I can use to recreate an empty database (no entities) from it?

afaneca avatar Aug 05 '22 00:08 afaneca