0
votes

Have been using Laravel for over a year now. My migrations folder has 39 files at the moment and i work (construct/destroy) with my database occasionally.

What happens is since ive created a "create_payments_table" migration, every migrate command that i execute builds all my tables normally but when login the migration history to my migrations table it stops at the 'create_payments_table' migration. So now when i create new migrations and run migrate again it tries to restart from my payments table which already exists giving me an error. Comparing my "create_payments_table" migration with the last logged migration file "create_pictures_table" it seems that everything is in order. Would like to know why my migrations create the tables but not all of them are been logged in migrations table?

My migrations table: My migrations table

My migrations folder:

My migrations folder

As u can see i added two new migrations and would like to run them without having to rollback my migrations table. But when doing so:

I get this error as artisan tryies to run de pauments migration again I get this error as artisan tries to run de payments migration again

1
If those 2 table exist in your db, then delete those 2. And in your database you have a table named mugrations go there and delete 2 row named with your new migration file. Then migrate again - sta
wich 2 tables mate? the ones im trying to create right now? no they dont exist. Mate maybe i wasnt clear at my question but plz try reading it again. - CamelCaseDamnUser

1 Answers

1
votes

You can migrate only a specific migration file :

php artisan migrate --path=/database/migrations/my_migration.php

Where my_migration will be your new migration file name like 2020_06_20_221554_create_additional_users_table