eggplantSword's avatar

Run specific migration file

I know they're supposed to go in order and I want that BUT I need to run a file in-between two of my migration files so I can't just run my migrations all at once. I have two that haven't been run yet, I need to run the second to last one first, then run a seeder and finally run the last migration.

I tried using this command (I'm using tenancy for Laravel, the php artisan tenants:migrate -h shows this as part of the options)

php artisan tenants:migrate --path="/database/migrations/tenant/2024_02_05_164904_add_column_to_sale_point_check_outs_table.php"

however when I try this I get an error

File does not exist at path /database/...

the thing is I know that file is there.

If I try and remove .php it says Nothing to migrate. but that's not true as it hasn't done what's in the file.

How can I do this?

0 likes
2 replies
aruszala's avatar
aruszala
Best Answer
Level 56

@msslgomez remove the leading / in your path:

php artisan tenants:migrate --path="database/migrations/tenant/2024_02_05_164904_add_column_to_sale_point_check_outs_table.php"

Please or to participate in this conversation.