jyundt / oval

The Oval
https://theoval.us
GNU General Public License v2.0
1 stars 0 forks source link

Fixup for initial DB migration script to allow deployments of a 'new'… #45

Closed jyundt closed 8 years ago

jyundt commented 8 years ago

… DB to function as expected.

I didn't realize it, but I started tracking Flask-Migrate (sqlalchemy) migrations after I manually created some DB tables.

This caused a fair amount of grief for "new" deployments and broke the Ansible playbook.

I updated the initial migration script to include the necessary commands to create tables from a "fresh" (blank) DB.

E.g. running db.create_all() is no longer necessary; on a fresh install just run ./manage.py db upgrade and Flask-Migrate will create the DB and apply migrations to bring it to "current".