From f1de861a259a138474a76666f9050672c4e039ac Mon Sep 17 00:00:00 2001 From: Daniel Cousens <413395+dcousens@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:27:54 +1000 Subject: [PATCH] fix prisma migration tests --- packages/core/src/lib/migrations.ts | 4 +--- tests/cli-tests/migrations.test.ts | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/core/src/lib/migrations.ts b/packages/core/src/lib/migrations.ts index 6308ffc0ef6..5d5de625833 100644 --- a/packages/core/src/lib/migrations.ts +++ b/packages/core/src/lib/migrations.ts @@ -245,9 +245,7 @@ We need to reset the ${credentials.type} database "${credentials.database}" at $ await runMigrateWithDbUrl(dbUrl, shadowDbUrl, () => migrate.reset()) } } - const { appliedMigrationNames } = await runMigrateWithDbUrl(dbUrl, shadowDbUrl, () => - migrate.applyMigrations() - ) + const { appliedMigrationNames } = await runMigrateWithDbUrl(dbUrl, shadowDbUrl, () => migrate.applyMigrations()) // inform user about applied migrations now if (appliedMigrationNames.length) { diff --git a/tests/cli-tests/migrations.test.ts b/tests/cli-tests/migrations.test.ts index 56c1624ebfd..5d260bb53b9 100644 --- a/tests/cli-tests/migrations.test.ts +++ b/tests/cli-tests/migrations.test.ts @@ -306,7 +306,6 @@ CREATE TABLE "Todo" ( Prompt: Name of migration init ? A migration has been created at migrations/migration_name Prompt: Would you like to apply this migration? true -Applying migration \`migration_name\` ? Connecting to the database ? Creating server ? GraphQL API ready`) @@ -377,7 +376,6 @@ describe('useMigrations: true', () => { Prompt: Name of migration add-is-complete ? A migration has been created at migrations/migration_name Prompt: Would you like to apply this migration? true - Applying migration \`migration_name\` ? Connecting to the database ? Creating server ? GraphQL API ready" @@ -452,7 +450,6 @@ describe('useMigrations: true', () => { Prompt: Name of migration remove all fields except id ? A migration has been created at migrations/migration_name Prompt: Would you like to apply this migration? true - Applying migration \`migration_name\` ? Connecting to the database ? Creating server ? GraphQL API ready" @@ -528,7 +525,6 @@ describe('useMigrations: true', () => { Prompt: Name of migration init2 ? A migration has been created at migrations/migration_name Prompt: Would you like to apply this migration? true - Applying migration \`migration_name\` ? Connecting to the database ? Creating server ? GraphQL API ready" @@ -666,7 +662,6 @@ describe('useMigrations: true', () => { ? GraphQL API available at /api/graphql ? Generating GraphQL and Prisma schemas ? sqlite database "app.db" created at file:./app.db - Applying migration \`migration_name\` ? The following migration(s) have been applied: - migration_name ? Your migrations are up to date, no new migrations need to be created