From b8bb636d757f17c5040a196134416ac2b925fb5c Mon Sep 17 00:00:00 2001 From: Anatoli Nicolae Date: Thu, 21 Mar 2024 12:50:20 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20regenerate=20client,=20deploy?= =?UTF-8?q?=20schema=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anatoli Nicolae --- docker-entrypoint.sh | 4 ++-- package.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1d753f816..e62d76396 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,8 +5,8 @@ # run, which is why this file exists in the first place. # Learn more: https://community.fly.io/t/sqlite-not-getting-setup-properly/4386 -# Generate schema and deploy -npm run setup:db +# Deploy database schema +npm run db:deploy # Start the app npm run start diff --git a/package.json b/package.json index b59c55146..8b380bdb9 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "db:diff": "prisma migrate diff --from-url=${DATABASE_URL} --to-migrations=./app/database/migrations --shadow-database-url=${SHADOW_DATABASE_URL} --script > rollback.sql", "db:prepare-migration": "prisma generate && prisma migrate dev --create-only --skip-seed", "db:generate-type": "prisma generate", + "db:deploy": "prisma migrate deploy", "db:deploy-migration": "prisma migrate deploy && prisma generate", "db:deploy-migration:staging": "dotenv -e .env.staging -- prisma migrate deploy && prisma generate", "db:deploy-migration:production": "dotenv -e .env.production -- prisma migrate deploy && prisma generate",