Migration like for seeds #38586
Unanswered
aneeskhan47
asked this question in
Ideas
Replies: 1 comment
-
Hello, Do you want to have track of seeders as migrations too? IHMO, you have 2 options to resolve such problem:
Using any of suggested options will record a migration into your database, where scheme and data was changed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
In this approach, each seeders is a class, like a migration: it defines both "up" and "down" methods, so you can run and rollback your seeds. Like migrations, the order of the files is determined by a timestamp at the creation time.
My use case for this is to populate my apps in production, in order to automatize this process, without having to deal with running each seed class individually, and manually.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions