Unified · Split
| @@ -90,7 +90,11 @@ export interface RunMigrationsOptions { · 89 unmodified lines | |||
| 90 | */ | 90 | */ |
| 91 | export const runMigrations = ({ toMigrationInclusive }: RunMigrationsOptions = {}) => | 91 | export const runMigrations = ({ toMigrationInclusive }: RunMigrationsOptions = {}) => |
| 92 | Effect.gen(function* () { | 92 | Effect.gen(function* () { |
| 93 | yield* Effect.log(`Running migrations 1 through ${toMigrationInclusive}...`); | 93 | yield* Effect.log( |
| 94 | toMigrationInclusive !== undefined | ||
| 95 | ? `Running migrations 1 through ${toMigrationInclusive}...` | ||
| 96 | : "Running migrations...", | ||
| 97 | ); | ||
| 94 | const executedMigrations = yield* run({ loader: makeMigrationLoader(toMigrationInclusive) }); | 98 | const executedMigrations = yield* run({ loader: makeMigrationLoader(toMigrationInclusive) }); |
| 95 | yield* Effect.log("Migrations ran successfully"); | 99 | yield* Effect.log("Migrations ran successfully"); |
| 96 | return executedMigrations; | 100 | return executedMigrations; |