Skip to content

Commit ebcfe24

Browse files
committed
fix next branch following rebase.
..
1 parent 6b6de4d commit ebcfe24

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

pnpm-lock.yaml

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/migration/migrator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export class Migrator {
328328
await this.#ensureMigrationLockTableExists()
329329
await this.#ensureLockRowExists()
330330

331-
return await this.#runMigrations(getMigrationDirectionAndStep)
331+
return await this.#runMigrations(getMigrationDirectionAndStep, options)
332332
} catch (error) {
333333
if (error instanceof MigrationResultSetError) {
334334
return error.resultSet

test/node/src/migration.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'node:path'
22
import { promises as fs } from 'node:fs'
3+
import { setTimeout } from 'node:timers/promises'
34

45
import {
56
FileMigrationProvider,
@@ -1078,7 +1079,7 @@ for (const dialect of DIALECTS) {
10781079
})
10791080
})
10801081

1081-
if (dialect === 'postgres' || dialect === 'mssql') {
1082+
if (sqlSpec === 'postgres' || sqlSpec === 'mssql') {
10821083
describe('custom migration tables in a custom schema', () => {
10831084
it('should create custom migration tables in custom schema', async () => {
10841085
const [migrator, executedUpMethods] = createMigrations(
@@ -1172,7 +1173,7 @@ for (const dialect of DIALECTS) {
11721173
...migrations,
11731174
[config.name]: {
11741175
async up(_db): Promise<void> {
1175-
await sleep(20)
1176+
await setTimeout(20)
11761177

11771178
if (config.error) {
11781179
throw new Error(config.error)
@@ -1182,7 +1183,7 @@ for (const dialect of DIALECTS) {
11821183
},
11831184

11841185
async down(_db): Promise<void> {
1185-
await sleep(20)
1186+
await setTimeout(20)
11861187

11871188
if (config.error) {
11881189
throw new Error(config.error)
@@ -1218,10 +1219,6 @@ for (const dialect of DIALECTS) {
12181219
(it) => it.name === tableName && (!schema || it.schema === schema),
12191220
)
12201221
}
1221-
1222-
function sleep(millis: number): Promise<void> {
1223-
return new Promise((resolve) => setTimeout(resolve, millis))
1224-
}
12251222
})
12261223
}
12271224

0 commit comments

Comments
 (0)