S
S
Sergey Beloventsev2017-08-24 21:36:48
Yii
Sergey Beloventsev, 2017-08-24 21:36:48

How to populate the database with migrations?

Actually, the question is, what do I need to fill the table with user data, is it possible to do this through migration?
In the Migration class itself, I found a public insert method, but I didn’t see it anywhere in the documentation or literature for what the yoke is used and whether it is possible to fill tables at all

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-08-25
@Maksclub

It is better to fill in through fixtures - they are used to fill in test data in testing:
https://nix-tips.ru/yii2-api-guides/guide-ru-test-...
Better yet, read this cool material:
www.elisdn .ru/blog/91/gii-fixture-generator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question