Repository navigation
Doctrine migations configuration + initial migrations - #129
Conversation
|
You said that "Existing installs already have the tables, so the initial migration fails there." Does that mean that DB changes specified in 3.1.0, 3.1.1 and 3.1.2 migrations are completely new? |
|
I see that this setup is taken from Netgen Layouts, so let me explain the versioning logic there: class names for migrations strictly follow the tags of the layouts/core package. e.g. Version030102 would be added ONLY in 3.1.2 of If NGRM e.g. does not have any DB changes in 3.1, 3.2 or 3.3, but has in 3.4.0, next migration version after Now here, as far as I understood, some changes are old (030000) and some are new (030100, 030101, 030102). If that is the case, I would propose to only add 030000 now, tag it with That way, you will have it in sync, and current schema separate from new stuff, allowing for marking 030000 version as already executed. |
| php bin/console doctrine:migrations:migrate --configuration=vendor/netgen/remote-media-bundle/migrations/doctrine.yaml | ||
| ``` | ||
|
|
||
| Run this command after every update of the bundle, for example as part of your deployment, so new migrations are applied. |
There was a problem hiding this comment.
This can be documented that it can be added in Composer post-update scripts.
|
Also, you should provide |
d6ad09c to
211a49d
Compare
|
@emodric Please check the PR again, everything should be fixed now. |
211a49d to
ed6557d
Compare
Adds Doctrine migrations for the bundle's database tables.
migrations/doctrine.yamlwith its own version table,ngrm_migration_versions;doctrine/doctrine-migrations-bundleis now requiredVersion030000createsngrm_remote_resourceandngrm_remote_resource_location, identical to whatdoctrine:schema:updategenerates;down()drops thempost-update-cmdRun with:
Existing installs already have the tables, so mark the initial migration as executed once (see UPGRADE.md):