A
A
Artem00712018-07-17 17:51:04
Laravel
Artem0071, 2018-07-17 17:51:04

How to structure migrations?

How do you structure migrations?
I found several options, but maybe there is one that is optimal?
1) All in one (cons - everything is in a bunch)
2) By model folders (that is, everything that relates to users in the migrations / users / * folder, etc.) (minus - instead you just migrateneed to score migrate --path=/database/migrations/*, while if there is a folder in users themselves, then it won’t work anymore and thus you can just forget to add something)
3) According to the release folders (for example, the folder rel1, rel2, ... (convenient, but the same seems to be in a mess, but structured)
) In general, what is the best way to organize all this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
seriogja, 2018-07-20
@seriogja

Good afternoon!
Great package for organizing migrations: https://github.com/JayBizzle/Laravel-Migrations-Or... . Distributes like this year/month/migration. In the comment, the parser ate part of the link :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question