Question

App Platform build missing last db migration file.

I’ve done about 8 successful automatic GitHub builds. The first db migration (single table) was successful. Adding the second migration (new table) worked. However, my 3rd migration which was adding new columns to the first table was never ran. I checked in GH and the 3 migration files are there and the build reference the latest commit, but the build logs only show 2 migration files. I’ve tried doing a whole rebuild and still nothing. My DB only reflects the first 2 migration files.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
May 14, 2023
Accepted Answer

Hi there,

Does the migration work as expected locally on your development environment?

There are a few things that I could suggest checking:

  • Use the App Platform web console and check if the migration file is actually there, you can use the web console to browse through your project and see if the latest commit has actually been pulled. If the file is missing, I would recommend doing a ‘Force Rebuild and Deploy’ and possibly also checking if you have pushed the changes to the correct branch
  • If this is not the case, check all available logs, both from DigitalOcean App Platform and your application. There might be error messages or other information that can help diagnose the issue.
  • Check if the database state is consistent with the state expected by the migration. If the database is in an unexpected state, the migration might fail or be skipped.
  • If possible, try to run the migration manually to see if there’s an issue. This might provide more detailed error messages or other information that can help diagnose the issue.

Let me know how it goes!

Best,

Bobby

I ran into this error one more time today and the fix was the same. I don’t understand why it’s happening though or how I could fix it during deployment? What’s strange is that my app deploys “successfully” even though the db migration failed.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel