D
D
Denis2021-01-16 15:44:01
MySQL
Denis, 2021-01-16 15:44:01

Is it possible to somehow synchronize the two databases by structure?

Made a separate database for tests. But now the problem is that any changes must be made both there and there. Is it possible to somehow synchronize the structure of the two databases? So that if you make changes to one, they are automatically copied to the second. Or do you have to manually copy the database each time? I write by hand, without migrations. With them, it’s probably easy to fill in migrations in .env for two databases, but also copy them in the sql manager in two clicks. And I would like it automatically.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2021-01-16
@Gromfer

Solved the problem by resetting the auto-increment fields in the very last test. Actually therefore also wanted to separate databases. And when using DatabaseTransactions, the tests left only a trace in the form of boosting auto-increment fields.
PS but if someone still saw this post hoping to find out the answer to the question in the title, then the answer is: you need to use database replication. Such tools are available in Navicat and Handy backup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question