Reputation: 1928
I have created by a mistake 2 migrations in my laravel project, using the php artisan make:migration
command called 2018_03_30_075929_drop_products_tags_table
and 2018_03_30_075242_create_products_tags_table
and then i have deleted the files.
Now everything i run the command php artisan migrate:refresh
I am get this error
Migration not found: 2018_03_30_075929_drop_products_tags_table
Migration not found: 2018_03_30_075242_create_products_tags_table
...
And i tried to run php artisan migrate:reset
, but I am getting the same error. How can I fix this, because it is driving me insane :(
Upvotes: 1
Views: 3629
Reputation: 875
You can delete all tables from database and migrate them again by this command:
php artisan migrate:fresh
Upvotes: -1
Reputation: 1609
tables
from databasemigrations name
from migrations table
In this scene:
Delete product_tags table. Then, delete
2018_03_30_075929_drop_products_tags_table
,
2018_03_30_075242_create_products_tags_table
rows from migration tables.
Upvotes: 1
Reputation: 15971
This is you have some migrations in your database
go to your database delete the migrations
table manually.
then you can create a migration table in your database
php artisan migrate:install
This will create a new migration table in your database.
then you can run
php artisan migrate
Hope this helps
Upvotes: 4