- Change your schema.yml file.
- Use the symfony doctrine:generate-migrations-diff command to generate the differences between the current classes and the changed schema. These changes are converted by Doctrine into a migrations files, you can find them in the lib/migration directory. In the filename you will see a version number.
- Type the symfony doctrine:migrate x command to update your database. x is the version number you found in the filename of the last migration file.
- Type the symfony doctrine:build --all-classes command to generate new classes for symfony.
Sunday, January 23, 2011
Work with Doctrine Migration in Symfony
To update your schema, classes, database without losing data, try to do this...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment