Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question