SCC
2 months ago
298
2
Forge

Can you set migrations to have already been run?

Posted 2 months ago by SCC

So, I moved servers from one provider to another, set it all up through Forge and somewhere along the way it went somewhat wrong. The site is running fine but when 'Quick Deploy' is running on Forge I keep getting errors but the changes I make still update.

I figured out that it's the migrations when I did the move deployed everything through GitHub and then imported the database from a backup, that appears to be the issue.

I see this when I run php artisan migrate:status

+------+------------------------------------------------+-------+
| Ran? | Migration                                      | Batch |
+------+------------------------------------------------+-------+
| Yes  | 2014_10_12_000000_create_users_table           | 1     |
| Yes  | 2014_10_12_100000_create_password_resets_table | 1     |
| Yes  | 2019_08_19_000000_create_failed_jobs_table     | 1     |
| No   | 2020_07_03_101319_create_blog_tables           |       |
| No   | 2020_07_03_104318_create_comments_table        |       |
| No   | 2020_07_03_151418_create_user_roles_tables     |       |
| No   | 2020_07_03_160844_create_images_table          |       |
| No   | 2020_07_03_221736_create_support_tables        |       |
| No   | 2020_07_03_221819_create_guides_tables         |       |
+------+------------------------------------------------+-------+

So each time I do an update I keep getting a deploy failed message in forge as some of the migrations have not run but as I mentioned all is fine on the site.

Is there any way to force all of these migrations to show they have been run?

Please sign in or create an account to participate in this conversation.