B
B
bondle2021-03-14 16:37:54
PHP
bondle, 2021-03-14 16:37:54

How would you implement migrations for several independent pieces of projects working from the same database?

There is one project, broken into independent modules in bare PHP. One part accepts hooks, the other works with their data. Projects are in different turnips on the gita. Now I thought about transferring changes in the database to migrations. But in which project should I place the migration data? Indeed, in the future there will be n more projects that independently work with the same database. The only thing that came to mind was to create another rap that will store only migrations.
Share your experience in solving similar problems.

ps chose this lib https://github.com/okvpn/migration-bundle
If worked, you can comment

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0x131315, 2021-03-15
@0x131315

Perhaps it is worth separating the part that works with the database into a separate service?

S
Sergey, 2021-03-18
@begemot_sun

Only one project should work with the base, it should be the entry point for other projects.
The common code should once again be stored as a separate project, in the same place as migrations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question