Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mark an individual Doctrine migration as ran/executed

Is there a way that I can mark a Doctrine migration as "ran" or "executed" in the way that it won't be shown as a migration that needs to be migrated?

app/console doctrine:migrations:migrate --add Version20140409203042

I don't see anything in the --help.

The reason for doing this is my DB is up to date and imported from elsewhere, but this migration is asking to be ran every time I run a doctrine:migrations:migrate.

like image 698
crmpicco Avatar asked May 20 '14 15:05

crmpicco


People also ask

What is a doctrine migration?

The Doctrine Migrations offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and powerful tool. In order to use migrations you need to do some setup first.

What is migration in Symfony?

Database migrations are a way to safely update your database schema both locally and on production. Instead of running the doctrine:schema:update command or applying the database changes manually with SQL statements, migrations allow to replicate the changes in your database schema in a safe manner.


1 Answers

I found that this functionality falls under the version command:

Use this command to add a single version:

app/console doctrine:migrations:version 20140430223207 --add

Use this command to add them all:

app/console doctrine:migrations:version --add --all

like image 58
crmpicco Avatar answered Sep 27 '22 16:09

crmpicco