Reputation: 9796
Say I have deployed a django website on heroku through a github repository. (For deployment I simply clicked on the deploy button here - https://github.com/AmmsA/theresumator#theresumator---using-django-resumator.) I now update the repository with new commits.
Q: How can I make changes in the deployed website from the repository without losing the data already present on the repository.
Upvotes: 0
Views: 678
Reputation: 15
Just set your remote project:
heroku git:remote -a
And then, push your project on Heroku: git push heroku main
I've written an article on it. You can see that. https://medium.com/@sreebash/how-to-update-previous-deployed-project-on-heroku-c778d555cd8a
Upvotes: 0
Reputation: 10305
When you are pushing the fresh commits git push heroku master
or via git hook git push origin master
-- these nothing to do with heroku database.
But this will run this command when build python manage.py migrate
so if you are changed something in the migrations definetly db schema get alter not the values stored in there.
Upvotes: 1