mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Allow to ignore migration_versions in doctrine:schema:validate or provide a similar migraiton command
#7451
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @VincentLanglet on GitHub (Dec 5, 2024).
Feature Request
What
I'd like the ability to run
doctrine:schema:validatewhen using migrations.It requires
migration_versionWhy
While it's not recommended to use both
doctrine:migrationsanddoctrine:schemacommands,I find useful to have
doctrine:schema:validatecheckingIn order to check the mapping, there is the option to run
But in order to check that no migration need to be generated (or runned) I didn't found the right command so far.
The command
only check generated migrations, but does not report error on missing generated migrations
I basically would like a
doctrine:migrations:diffbut which success only if there is an empty diff.Does an option to this command would be the right way to do it ?
@greg0ire commented on GitHub (Dec 5, 2024):
Hi Vincent!
We discussed this during the Hackathon, here is what we wrote down:
So the plan would be to make
doctrine/migrationsmandatory, but the changelog table would be optional, and people would usedoctrine:schema:validateonly for mapping validation. There is a discussion about this here: https://github.com/doctrine/migrations/issues/1406#issuecomment-2402065262I think so too but, it would reside in the migrations package, which would become kind of mandatory
If you want to work on this, I think this would be a good first step towards this new model.
@VincentLanglet commented on GitHub (Dec 5, 2024):
Didn't know about this issue ; I'll close it to avoid the duplicate then