-
Notifications
You must be signed in to change notification settings - Fork 0
2. Alembic ‐ Updating the DB Schema
Gabe edited this page Aug 24, 2024
·
1 revision
Keeping track of changes to the database without messing it up is hard, sorry! If you want to make any changes, you'll have to learn about how alembic does migrations here https://alembic.sqlalchemy.org/en/latest/tutorial.html
Feel free to ask anyone in the W3 committee for help though!
source .venv/bin/activate
cd src
alembic revision -m "description"
# TODO: edit the new revision file in versions/
alembic upgrade headsource .venv/bin/activate
cd src
# ensure you're connected to the correct database by using the following
python database.py
# TODO: ensure your models are loaded in src/alembic/env.py (import <path>.models)
alembic revision --autogenerate -m "description"
# TODO: confirm / edit changes
alembic upgrade head