Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
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.
Accepted Answer
Hi there,
I think that you should not be using the db database, instead you should just use the default postgres database itself that the database user has access to.
How are you defining your database details exactly?
Let me know how it goes.
To run Django migrations on your App Platform development database, follow these steps:
Set up your environment variables: Make sure your Django app on App Platform is configured with the correct environment variables pointing to your development database (e.g.,
Connect to your app’s container or use remote execution: Since App Platform runs your app in a managed environment, you generally need to run migrations inside the deployed container or via the platform’s CLI.
Run migrations with a deployment hook or manually:
python manage py migrate
Deployment hook: Configure a post-deploy hook in your App Platform service to run migrations automatically after each deployment. For example, add this command in your App Platform dashboard:
python manage py migrate --noinput
Ensure the dev database is accessible: The dev database should allow connections from your App Platform environment. Confirm network rules and credentials are set correctly.
Check logs for migration output: Review the App Platform logs to verify that migrations ran successfully without errors.
Example post-deploy hook snippet:
python manage py migrate --noinput
This approach ensures your migrations are always applied in your dev environment automatically after deployment.