E
E
Eugene Pukha2018-03-09 11:26:59
symfony
Eugene Pukha, 2018-03-09 11:26:59

How to migrate migrations in Symfony 4?

Good day everyone. Actually such moment is interesting:
At the moment I understand symfony. The local copy of the site works with sqlite, in "production" the site runs on a separate server, and there is already a MySQL database. Migrations are created on-premises via:
php bin/console doctrine:migrations:diff
The problem is moving such migrations from on-premises to the server. When I try to run them, the
php bin/console doctrine:migrations:migrate
following error is displayed in the console

Error Migration can only be executed safely on 'sqlite'.

How is it necessary to create migrations so that they work equally correctly in all supported databases?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Pukha, 2018-11-13
@summoner2015

The solution to the problem was found here .

A
Alexey Skobkin, 2018-03-09
@skobkin

1. Look at least the code of migrations for a start. Pay attention to the if condition.
2. Usually no one keeps different DBMS in the development environment and in production.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question