B
B
BonBon Slick2020-10-23 18:21:17
symfony
BonBon Slick, 2020-10-23 18:21:17

What is the best approach for upgrading a production database?

I'm confused, both ConsoleCommand and Migrations work fine.
In fact, to update the database prod, you need security and confidence that the script will pass as it should.
Both options are transactional and can use DQL, which is quite convenient.
The upgrade is often single and after execution the code will be deleted, so it is worth adding more speed and clarity of what needs to be done.
Here I am leaning towards the console command. it can also be reused later for other scripts and there is immediately access to services, in migrations a little differently, and also because after deleting the migration, its name will be in the database migration table, which we do not need. Perhaps I missed something about migrations and in some cases it is still worth using them, right?

So what and when to use?
What is better and why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question