Skip to content

maxunt/heroku_crypto_alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

heroku_crypto_alerts

Changing the Heroku Postgres Database:

  • make model changes locally
  • Run ‘flask db migrate’ locally
  • Run ‘flask db upgrade’, this allows you to continue making changes locally with a fresh migration, will break if you do not do this
  • Run ‘git add .’
  • Run ‘git commit -m ‘model change’’
  • Run ‘git push heroku master’
  • Run ‘heroku run flask db upgrade’
  • Check to see that database changes were successful

If still having problems with model update here is a hard reset:

  • Run ‘heroku psql’ to open a database shell
    • Run ‘delete from alembic_version;’ to remove the latest version
    • ‘\q’ to leave shell
  • Locally delete the file in instance
  • Locally delete the entire migrations folder
  • Run ‘flask db init’ to recreate
  • Run ‘flask db migrate’ to populate it
  • Run ‘git add .’
  • Run ‘git commit -m ‘model change’’
  • Run ‘git push heroku master’
  • Go back into psql shell and drop all tables except alembic_version
  • Run ‘heroku run flask db upgrade’ and you should be set with an updated version of your db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages