Answer the question
In order to leave comments, you need to log in
Yii2. How to organize the exchange of database data between developers?
How to implement data exchange for the example of directories (cities, districts, ...) so as not to exchange dumps between developers. Tell me how to do it?
Answer the question
In order to leave comments, you need to log in
As an option: www.yiiframework.com/doc-2.0/guide-db-migrations.html though for large directories you still have to make dumps and roll them from the migration.
Or a shared connection to one remote database for all developers. But this option can lead to other unexpected side effects.
Give them remote access to the directory database with read-only access.
You need to use one database, and allow connection to it not only from localhost. Nc_Soft correctly said.
$this->batchInsert('{{%region}}', ['id', 'name'], [
[3, 'Винницкая область'],
[4, 'Волынская область'],
[5, 'Днепропетровская область'],
[6, 'Донецкая область'],
[7, 'Житомирская область'],
[8, 'Закарпатская область'],
[9, 'Запорожская область'],
[10, 'Ивано- Франковская область'],
[2, 'Киевская область'],
[11, 'Кировоградская область'],
[12, 'Луганская область'],
[13, 'Львовская область'],
[14, 'Николаевская область'],
[15, 'Одесская область'],
[16, 'Полтавская область'],
[17, 'Ровенская область'],
[18, 'Сумская область'],
[19, 'Тернопольская область'],
[20, 'Харьковская область'],
[21, 'Херсонская область'],
[22, 'Хмельницкая область'],
[1, 'Черкасская область'],
[23, 'Черниговская область'],
[24, 'Черновицкая область']
]);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question