Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 763 Bytes

readme.md

File metadata and controls

18 lines (14 loc) · 763 Bytes

The diagram below illustrates a simple path for enacting changes to the data model, and using Alembic to automate the database changes:

  1. Update database/models.py (e.g., add columns, tables)
  2. Use alembic to compute the revisions
cd database
alembic revision --autogenerate -m "Added Tables and Columns"
  1. Edit the revision file to signify your understanding
  2. Activate the change
alembic upgrade head 

alembic example

Then, run rebuild-from-model. For more information, see Database Design Changes.