S
S
Sergey Erin2021-02-14 19:16:31
Yii
Sergey Erin, 2021-02-14 19:16:31

What is the best way to import data using Yii2?

Hello! The situation is this - from a dump of another database, I need to load information from several tables into my database. Is it better to do it as a migration or call the import method via the console? there are probably other options, I will be glad if you advise how best to implement this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Lykasov, 2021-02-15
@lykasov-aleksandr

In my opinion, if your database structure changes at the same time, then you can combine it with migration. If the data is simply transferred, then do a console command.

S
SuperToster, 2017-09-25
@michael_tsaruk

Be careful with these plugins. For the most part, they mess up a lot on devices, so be sure to thoroughly test both in emulators and on devices.
Of the ready-made solutions, mmenu.frebsite.nl works decently.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question