From cb4020569cee87779ae4a9597141b6e60671af90 Mon Sep 17 00:00:00 2001 From: forehalo Date: Wed, 25 Sep 2024 02:45:28 +0000 Subject: [PATCH] fix(server): remove unused admin environment (#8378) fix CLOUD-70 --- .github/deployment/self-host/compose.yaml | 2 -- .../server/src/data/migrations/99999-self-host-admin.ts | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/deployment/self-host/compose.yaml b/.github/deployment/self-host/compose.yaml index 9cdac96be8..cbc1d4b0b2 100644 --- a/.github/deployment/self-host/compose.yaml +++ b/.github/deployment/self-host/compose.yaml @@ -28,8 +28,6 @@ services: - REDIS_SERVER_HOST=redis - DATABASE_URL=postgres://affine:affine@postgres:5432/affine - NODE_ENV=production - - AFFINE_ADMIN_EMAIL=${AFFINE_ADMIN_EMAIL} - - AFFINE_ADMIN_PASSWORD=${AFFINE_ADMIN_PASSWORD} # Telemetry allows us to collect data on how you use the affine. This data will helps us improve the app and provide better features. # Uncomment next line if you wish to quit telemetry. # - TELEMETRY_ENABLE=false diff --git a/packages/backend/server/src/data/migrations/99999-self-host-admin.ts b/packages/backend/server/src/data/migrations/99999-self-host-admin.ts index 327772af58..32cb389798 100644 --- a/packages/backend/server/src/data/migrations/99999-self-host-admin.ts +++ b/packages/backend/server/src/data/migrations/99999-self-host-admin.ts @@ -23,11 +23,7 @@ export class SelfHostAdmin1 { } // revert the migration - static async down(db: PrismaClient) { - await db.user.deleteMany({ - where: { - email: process.env.AFFINE_ADMIN_EMAIL ?? 'admin@example.com', - }, - }); + static async down() { + // } }