Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bostonmacosx's avatar

Trouble Getting Wrapped around Migration and Order

Hello there. I'm new to laravel OOP and MVC in general. Coming from spag. code and phpmyadmin I'm having a hard time getting my head wrapped around migrations.

The issue I'm seeing is the following. I installed the default migrations for Auth and then added a table for a Menu system I'm going to design. So at this point I have three migration files. Here is the problem I'm seeing.

I want to do "sentinel" as my authoization add on for my project. They say to get rid of the default tables...but that would mean getting rid of the Menu table as well as that came after the default Auth tables.

Honestly I don't like how migrations can't be grouped to address certain tables so you can rollback one table or the changes made to one table. Or even label each migration with a task alias and have that task(maybe 5 migrations long) just rollback since it is independant from something else you are doing with the database.

I'm about to abandon migrations...because it seems convoluted to have to "drop" table 1 to make a change to table 2 since table 1's migration file is before table 2s.

I think I would make:

Task 1 make Table AuthLaravel -> migration file 1
task 2 make Table Menus->migration file 2
Task 3 drop tables from task 1 -> Just drop tables as the "up" method
Task 4 the Migrations for Seninel tables...

Just a though but is there a better way to do this?

thanks Rob

0 likes
0 replies

Please or to participate in this conversation.