Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SCC's avatar
Level 7

Can you set migrations to have already been run?

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?

0 likes
2 replies
SCC's avatar
SCC
OP
Best Answer
Level 7

So really then the issue as I suspected is that when I deployed for the 1st time through Forge then imported a database backup, the issue was that some updates I had done meant that the migration names had changed slightly so a mismatch.

The solution was to change the migration names locally to match what was in the remote database then push to GitHub, once that happened Forge ran the automatic deploy, the migrations matched, all show as having been run and errors all gone!

hammers's avatar

Thanks for the reply SCC. Actually, I've been facing the same issue from the hotmail login last couple of days. Moving a server is a hectic job for beginners. Anyways, will look into it. Thanks again.

Please or to participate in this conversation.