S
S
Sergey2014-10-18 12:05:27
MySQL
Sergey, 2014-10-18 12:05:27

Laravel: how to migrate and process data from old DB?

Good afternoon,
There is an old site with a bunch of different data. I recently wrote a new engine for it in Laravel. The site is constantly working, the database is constantly used, the data is very important. During the transfer, the site can be disabled, but for a couple of hours at night.
The only question is how to transfer the base.
The new database has a different structure than the old one. Just changing the names of tables or fields will not work, you need to write a script for processing.
You need to get all the data from the old database and push it into the correct tables and fields in the new one. What is the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-10-18
@TsarS

Well, if Laravel has the ability to connect to several databases at the same time, then connect and take something from one database, process and write to another
$users = DB::connection('foo')->select(...);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question