B
B
BonBon Slick2017-08-15 21:07:41
Database
BonBon Slick, 2017-08-15 21:07:41

Modernizing a production database so that the user won't notice?

For example, there is a database, there are half a hundred tables in it, this is production, how to put it on a live database with a virgin environment, in which a lot has already changed?
More tables, different field names in tables, PhP scripts, class names changed.
All this, of course, must be done, without pausing the site, according to the type of page where it displays the inscription that the site is unavailable due to technical work.
And since the architecture of the database has changed, the classes have changed, it has become larger, it has become more complicated, and it will be necessary not only to replace the plates in the DBMS. I’m thinking of dumping the data from the database, correcting it with the new one, fixing it on the localhost and putting it back on the live site, however, in this case, while we are doing all this, we lose new records in this period of time, after all. In general, if you look at it this way, half of the site was rewritten and added.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2017-08-15
@BonBonSlick

Not enough information. It is not known how big the changes are.
Has only the database changed or the site scripts too?
How did the database change, records were added, or did the fields change too? If only the records have been changed, then there will be no problems at all, just add them to the live database with one request.

N
Night, 2017-08-15
@maxtm

There is such a thing - migration.
Scripts / software that changes the database schema and data for new tasks.

V
Vasily Nazarov, 2017-08-16
@vnaz

1. Make a local copy of the combat site.
2. Go through the entire update process locally, recording everything you do.
Write database update scripts. If your development environment does not imply database migrations, just make a set of SQL and/or PHP scripts (such as ALTER TABLE, UPDATE SET new_field = old_field1 + ' ' + old_field2).
Naturally, write down the commands with which you will roll out new code if you are not using Git.
3. Repeat step 2 for records for fidelity.
4. Make a backup of the "battle" and repeat step 2, but on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question