V
V
Vladimir2015-08-03 11:35:03
Oracle
Vladimir, 2015-08-03 11:35:03

How to write migrations from a dump in yii?

Good afternoon. An interesting problem has arisen. It is necessary to set yii migration bases on the dump. What I mean: there is a database dump, it contains about 4000 lines of requests for creating tables, procedures, and so on. and 1500 lines of queries, which make the project settings in some tables. At the moment, this dump is constantly updated and applied immediately after the schema is created. There was a task to shove this file on migrations. What is the best and most convenient way to do this? Maybe there is some kind of software that will help work with migrations?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
matperez, 2015-08-03
@azrail_dev

Here https://github.com/schmunk42/database-command and here stackoverflow.com/questions/13605767/generating-mi... You can probably finish it for yourself. If you need to prepare migrations one-time, you can import the dump and set such a thing on the database.

K
kompi, 2015-08-03
@kompi

What a masochism, to divide a large dump (considering that there are triggers and procedures) into php migrations, if you can do without them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question