This commit is contained in:
10
.history/migrate_20250808200715.sh
Normal file
10
.history/migrate_20250808200715.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
for s in auth profiles match chat payments; do
|
||||
f="services/$s/alembic/env.py"
|
||||
# добавим импорт пакета моделей, если его нет
|
||||
grep -q "from app import models" "$f" || \
|
||||
sed -i 's/from app.db.session import Base # noqa/from app.db.session import Base # noqa\nfrom app import models # noqa: F401/' "$f"
|
||||
done
|
||||
|
||||
for s in auth profiles match chat payments; do
|
||||
docker compose run --rm $s alembic revision --autogenerate -m "init"
|
||||
done
|
||||
Reference in New Issue
Block a user