Reputation: 855
I was using Yii2 framework for a long time. There is a DB migrations in Yii2 (http://www.yiiframework.com/doc-2.0/guide-db-migrations.html). It helps easily change DB structure by console command.
Is there something similar to Yii2 DB migrations in Zend Framework 2?
Upvotes: 1
Views: 4718
Reputation: 9008
In Zend Framework 2 there are some possibilities to manage database migrations. First it depends what you are using to interact with the database. If you are using Doctrine
you could use https://github.com/MurgaNikolay/DoctrineMigrationsModule.
If you are using Zend\Db
instead, you could use this module: https://github.com/vadim-knyzev/ZendDbMigrations (documentation is in russian...).
There are some general modules that help you managing migrations: https://github.com/vgarvardt/ZfSimpleMigrations (the one with the most activity in the repo) or https://github.com/valorin/zf2-phinx-module that is using Phinx
under the hood.
If you want to have a look to something really new, go to https://github.com/baleen/migrations, a really nice project that is being developed. This will probably require some work on your end to put the pieces together.
Upvotes: 4