fix(ci): migrations idempotentes et deploy prod sans toucher Postgres
Some checks failed
CI / Lint, Test & Build (push) Failing after 5m48s
Deploy to Production / Build and Deploy (push) Has been cancelled

Les migrations échouaient sur une base vide (contraintes/index déjà créés par init).
Le workflow deploy ne recrée plus Postgres ni ne force les entrées _prisma_migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-05-17 08:53:29 +00:00
parent bd214f010e
commit b5fb439592
4 changed files with 42 additions and 22 deletions

View File

@@ -51,7 +51,12 @@ jobs:
- name: Setup test database
run: |
apt-get update && apt-get install -y postgresql-client
sudo apt-get update -qq && sudo apt-get install -y -qq postgresql-client
for i in $(seq 1 30); do
PGPASSWORD=memento_test pg_isready -h postgres -U memento_test -d memento_test && break
[ "$i" -eq 30 ] && exit 1
sleep 2
done
PGPASSWORD=memento_test psql -h postgres -U memento_test -d memento_test -c "CREATE EXTENSION IF NOT EXISTS vector;"
npx prisma migrate deploy