Organizing Laravel Migrations into a subfolder is bad practice?

Asked

Viewed 129 times

1

I have created several Migrations that are related to each other, for having foreign keys and etc... but I don’t want to mix them with the Migrations related to auth, Permissions and etc.

My question is: I can create a subfolder to organize my Migrations within database/Migrations?

Since this requires a little more command lines to run the Migration of a specific folder, I wanted to know if this is bad practice and etc, because another friend of mine said that this is not correct.

1 answer

0


I believe it is not necessary, the effort does not compensate for the return in this organization, unlike controllers, models and visions, which are groups of code logic to which you return constantly to work and therefore the larger and more complex your system, more hierarchies of organization of the files can bring productivity, with each Migration you work only once and performs its function in changing the database.

They should not be "reused", including running the rollback if necessary, it will be on a single occasion of deployment of unsuccessful improvement.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.