Add alembic migrations

This commit is contained in:
Jacob Windsor
2025-02-19 15:55:16 +01:00
parent ac3727065f
commit 0d1e53acdb
10 changed files with 300 additions and 3 deletions
+11 -2
View File
@@ -13,11 +13,20 @@ install-dev:
$(VENV_DIR)/bin/pip install -r $(REQ_FILE) -r requirements-dev.txt
start:
docker compose up
docker compose up --build
clean-db:
docker compose down
docker compose down -v db
clean:
rm -rf $(VENV_DIR)
rm -rf $(VENV_DIR)
create-migration:
@read -p "Enter migration message: " MESSAGE; \
if [ -z "$$MESSAGE" ]; then \
echo "Migration message cannot be empty."; \
exit 1; \
fi; \
docker compose up -d db
cd backend && alembic revision --autogenerate -m "$$MESSAGE"