Skip to content

Commit

Permalink
fix prisma migration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Apr 11, 2024
1 parent 72abcb2 commit f1de861
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/lib/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 0 additions & 5 deletions tests/cli-tests/migrations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f1de861

Please sign in to comment.