1
votes

I word on a project which use Laravel migration. I have a migration list :

2015_09_01_010101_table_orders
2015_09_02_010101_table_products
2015_09_03_010101_table_customers

I know that 2015_09_01 SQL migration are already in my database, but Laravel don't know it. So when I run php artisan mig:run Laravel shows me an SQL Error.

How can I do a fake migration ? I want that Laravel believes that I already use 2015_09_01 migration. With Django I can run a fake migration but I didn't find anything for Laravel.

1
does migration resides in database??Zahan Safallwa

1 Answers

2
votes

You can manually add a new row in your migrations table:

--------------------------------------------
| migration                      |  batch  |
--------------------------------------------
| 2015_09_01_010101_table_orders |    1    |
--------------------------------------------

Laravel will check this table for migrations and skip those which are already present.