D
D
Denis Ogurtsov2015-10-12 12:32:21
Software design
Denis Ogurtsov, 2015-10-12 12:32:21

How to organize migrations in a project?

There is a project. Modular. YII2 (but I think it doesn't matter)
There are some modules that need data from certain tables (sometimes there are a lot of them)
For some modules, these tables are not needed at all, some do not need data in these tables.
Now everything lies in migrations: when you raise migrations, you create tables and put a huge amount of data in them (which you probably will never need locally). I'd like to expand either a table or even no table at all.
Options:

  1. Add a flag (such as --with-data) when raising migrations, and if it exists, then raise data in migrations. But how to flexibly configure it? For example, for one developer, only certain data is needed and no others are needed.
  2. Bye bye

Who has any ideas? Who solves this kind of problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2015-10-12
@dmitriylanets

apply the environment settings scheme, for example, testing, development, production
, depending on the environment, roll out the appropriate migrations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question