M
M
magary42015-11-20 19:33:34
MySQL
magary4, 2015-11-20 19:33:34

How to organize database data synchronization between developers during the development period?

The issue of code relevance for all developers is solved by version control systems.
Integrity of the database structure by migrations.
But what about the data?
Well, the developer has made a new feature. In the process of testing, he created a certain number of records in the database. Some new objects and a bunch of replicated data.
If he just pushes his codes, then no one will see his feature.
What tools are available to solve this problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Nikolaev, 2015-11-20
@magary4

And what prevents you from adding data to the migration?

Z
Zaporozhchenko Oleg, 2015-11-20
@c3gdlk

Seeds are used to populate the database with test data. Only their code is written in such a way that they do not just try to put data into the database, but before that look for similar ones. If the data is too complex - the same seeds, but the values ​​themselves are stored in YML files in some db/fixtures folder.
If this is not enough, you can look towards https://github.com/harrystech/seed_migration
. You can also write rake tasks like db:populate:feature_name - this approach will allow you to fill the database with only the necessary data. Well, accordingly, there will be one common task that will drive all populate

M
Max, 2015-11-20
@MaxDukov

well pushte at the same time and insert scripts. Replication, something tells me, it will only interfere here.

V
Vitaly Emelyantsev, 2015-11-22
@Gambala

Use seeds.rb, not migrations. Since the migrations will have to be run on the production server, and your task is to exchange data only among developers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question