fix(makefile): use \alembic upgrade heads\ for multi-branch migrations
The project has multiple migration branch heads (one per module: softdelete, cms, customers, loyalty, ...) so \`migrate-up\` and \`db-reset\` need \`heads\` (plural). The \`head\` (singular) form hit "Multiple head revisions are present" once the first module branch was created. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
Makefile
4
Makefile
@@ -74,7 +74,7 @@ endif
|
||||
|
||||
migrate-up:
|
||||
@echo "Running database migrations..."
|
||||
$(PYTHON) -m alembic upgrade head
|
||||
$(PYTHON) -m alembic upgrade heads
|
||||
@echo "✅ Migrations completed successfully"
|
||||
|
||||
migrate-down:
|
||||
@@ -170,7 +170,7 @@ db-reset:
|
||||
@echo "Dropping and recreating public schema..."
|
||||
$(PYTHON) -c "from app.core.config import settings; from sqlalchemy import create_engine, text; e=create_engine(settings.database_url); c=e.connect(); c.execute(text('DROP SCHEMA public CASCADE')); c.execute(text('CREATE SCHEMA public')); c.commit(); c.close()"
|
||||
@echo "Applying all migrations..."
|
||||
$(PYTHON) -m alembic upgrade head
|
||||
$(PYTHON) -m alembic upgrade heads
|
||||
@echo "Initializing production data..."
|
||||
$(PYTHON) scripts/seed/init_production.py
|
||||
@echo "Initializing log settings..."
|
||||
|
||||
Reference in New Issue
Block a user