feat: add flask upgrade-db command for running db upgrade with redis lock (#5333)

This commit is contained in:
Bowen Liang
2024-06-18 13:26:01 +08:00
committed by GitHub
parent 9b7fdadce4
commit 5f0ce5811a
4 changed files with 29 additions and 5 deletions

View File

@@ -38,13 +38,14 @@ jobs:
- name: Install dependencies
run: poetry install -C api
- name: Set up Middleware
- name: Set up Middlewares
uses: hoverkraft-tech/compose-action@v2.0.0
with:
compose-file: |
docker/docker-compose.middleware.yaml
services: |
db
redis
- name: Prepare configs
run: |
@@ -54,4 +55,4 @@ jobs:
- name: Run DB Migration
run: |
cd api
poetry run python -m flask db upgrade
poetry run python -m flask upgrade-db