fix: validate explicit migrations and preserve large business ids

This commit is contained in:
Yvan
2026-11-06 07:00:05 +08:00
parent f6f2a4745e
commit 0f0ec2e6d7
53 changed files with 2653 additions and 1445 deletions
+6
View File
@@ -91,6 +91,12 @@ for name in "${NAMES[@]}"; do
fi
done
echo 'Applying and verifying database migrations before starting the service.'
docker run --rm --name sw2-migrate --label com.sw2.application=sw2 \
--network "$NETWORK" --env-file "$BASE_DIR/runtime.env" \
-v "$BASE_DIR/config:/data/conf:ro" -v "$BASE_DIR/log:/app/logs" \
"$BACKEND_IMAGE" /app/kratos-admin -conf /data/conf/config.yaml -migrate
created+=(sw2-backend)
docker run -d --name sw2-backend --label com.sw2.application=sw2 \
--restart unless-stopped --network "$NETWORK" \