From e85c4b9bcb37ccd34795a85c5d935c60cec0707b Mon Sep 17 00:00:00 2001 From: jacy-dukang Date: Mon, 6 Jul 2026 23:40:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E6=A0=B8=E9=94=80=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/auto-release.env.example | 3 +++ deploy/auto-release.sh | 6 +++++- .../src/modules/ops/admin-redeem-debug.controller.ts | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/deploy/auto-release.env.example b/deploy/auto-release.env.example index 2286e63..a3593b9 100644 --- a/deploy/auto-release.env.example +++ b/deploy/auto-release.env.example @@ -13,3 +13,6 @@ DEPLOY_WEBHOOK_HOST=127.0.0.1 DEPLOY_WEBHOOK_PORT=8095 DEPLOY_LOG_FILE=/var/log/dukang/deploy.log DEPLOY_LOCK_FILE=/var/run/dukang-deploy.lock + +# Prisma db push 遇到 schema 变更警告时自动继续(开发/测试环境可开) +PRISMA_ACCEPT_DATA_LOSS=true diff --git a/deploy/auto-release.sh b/deploy/auto-release.sh index f9c5d9b..2c3dede 100644 --- a/deploy/auto-release.sh +++ b/deploy/auto-release.sh @@ -74,6 +74,10 @@ sed -i 's/\r$//' "$ENV_FILE" 2>/dev/null || true find "$APP_ROOT/deploy" -maxdepth 1 -name '*.sh' -exec sed -i 's/\r$//' {} + 2>/dev/null || true log "RUN remote-release.sh" -bash "$APP_ROOT/deploy/remote-release.sh" +RELEASE_ARGS=() +if [[ "${PRISMA_ACCEPT_DATA_LOSS:-false}" == "true" ]]; then + RELEASE_ARGS+=(--accept-data-loss) +fi +bash "$APP_ROOT/deploy/remote-release.sh" "${RELEASE_ARGS[@]}" log "DONE auto-release ($REMOTE_SHA)" diff --git a/server/dukang-api/src/modules/ops/admin-redeem-debug.controller.ts b/server/dukang-api/src/modules/ops/admin-redeem-debug.controller.ts index 9c40450..abdf2ea 100644 --- a/server/dukang-api/src/modules/ops/admin-redeem-debug.controller.ts +++ b/server/dukang-api/src/modules/ops/admin-redeem-debug.controller.ts @@ -3,7 +3,7 @@ import { HqAuthGuard } from '../../common/guards/hq-auth.guard'; import { HqOperation } from '../../common/hq-operation/hq-operation.decorator'; import { HqOperationAction } from '../../common/hq-operation/hq-operation.constants'; import { AdminRedeemDebugService } from './admin-redeem-debug.service'; -import type { +import { AdminRedeemDebugCreateTokenDto, AdminRedeemDebugStoreTokenDto, } from './dto/admin-mutate.dto';