G
G
Glory2020-10-19 22:02:51
Laravel
Glory, 2020-10-19 22:02:51

How would you implement the synchronization of the working database with the development one?

There is a backend on Laravel with an admin panel. Every day there are added goods, there are new orders.

us developers used to have enough use of outdated dumps. We just created an artisan command that would fill in the currency tables. countries and other little things. but now the project has already been launched and it is important for us to work with more or less up-to-date data. How would this be done in a clever way?

Now I have the following algorithm in my head:
- create a Route on the server that would run a command to create a dump of the entire database and archive it. Running this task will be run with the atisan command from the local machine.
- create a second artisan command on the local machine, which would download this dump from the desired address using server-level identification and then deploy the dump on the local machine.

How else could this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JhaoDa, 2020-10-20
@JhaoDa

You can also start using the power of some CI / CD - Bitbucket, Gitlab etc. Let it perform all the tasks of creating a dump, you only pull it together as needed.
At the same time, this will allow you to steer test servers, rolling on them an up-to-date (almost) snapshot of the database, if you have / appear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question