To prevent migration conflicts between different developers, we decided to avoid deploying any migrations files; and rather run makemigrations
after deployment.
But every time we deploy, the existing migration files are deleted and a new 001_initial.py
file is created, leading to a programmingerror
Why is Digital Ocean deleting the existing migration files rather than running a new makemigration and appending the model changes to the existing files? We run python manage.py makemigrations && python manage.py migrate
before the run commands.
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.
Hi there,
You should not make the changes directly on the App Platform as the storage there is Ephemeral meaning that after every deployment any changes that you made directly to the local storage will be lost.
You should make your changes to your GitHub project and those changes will be deployed to your App Platform.
https://docs.digitalocean.com/products/app-platform/how-to/store-data/
Let me know if you have any questions.
Best,
Bobby