From 8795617d7fe5be937df8a47457060b29af05363b Mon Sep 17 00:00:00 2001 From: devops Date: Thu, 15 Oct 2026 18:28:28 +0000 Subject: [PATCH] fix(deploy): apply committed support chat migrations --- scripts/deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index f3a4cbd0..c1e6f765 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -141,8 +141,13 @@ rm -f "${BOT_ENV}" echo "Waiting for backend to start..." sleep 15 -# Code-only deployment: never mutate stage or production data here. -# Schema migrations and seed require a separate, explicitly authorized operation. +# Apply committed Prisma migrations as part of the CI/CD deployment. +# This is intentionally migrate deploy (not db push): it is repeatable, +# fail-closed, and applies only migrations already reviewed and committed. +echo "Applying committed database migrations..." +docker exec "${CONTAINER_PREFIX}" npx prisma migrate deploy + +# Code-only deployment: seed and destructive data changes are not performed here. # Auto-cleanup old docker builder cache to keep disk healthy (keeps latest 6GB) echo "Cleaning up old docker build cache..."