M
M
MEGApixel232016-02-12 16:39:04
Zend Framework
MEGApixel23, 2016-02-12 16:39:04

How to perform database migration in Zend Framework 2?

I'm trying to migrate from Yii2 to ZF2. In the course of acquaintance with the second one, the question arose, how to perform database migrations?
For example, in Yii2, using the console utility, you could create a file in which you can describe which table, which fields to add / remove, etc. For ZF2, I could not google anything normal, except for third-party modules. Is there something "native" for these purposes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cat Anton, 2016-02-12
@MEGApixel23

There is nothing native. There is a ZfSimpleMigrations module and there are alternatives:
https://github.com/ziadoz/awesome-php#migrations

N
Novomirskoy, 2016-02-13
@Novomirskoy

I advise you to look at solutions that can be used with any php framework. Otherwise, in the event of a move, you will need to look for something new, adapted to a specific framework. The first thing that comes to mind is Doctrine Database Migrations . Here's a framework-independent use case link . And this is in conjunction with Zend 2 link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question