Skip to content

Commit 65e6dd9

Browse files
committed
Code cleanup
1 parent b00ddea commit 65e6dd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drizzle-kit/src/cli/schema.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { mkdirSync } from 'fs';
55
import { renderWithTask } from 'hanji';
66
import { dialects } from 'src/schemaValidator';
77
import '../@types/utils';
8-
import { MigrationConfig, MigratorInitFailResponse } from 'drizzle-orm/migrator';
8+
import type { MigrationConfig, MigratorInitFailResponse } from 'drizzle-orm/migrator';
99
import { assertUnreachable } from '../global';
1010
import { type Setup } from '../serializer/studio';
1111
import { assertV1OutFolder } from '../utils';
@@ -631,6 +631,8 @@ export const pull = command({
631631
}
632632

633633
if (init) {
634+
if (!migrate) throw new Error(`--init can't be used with ${dialect}`);
635+
634636
console.log();
635637
console.log(grey('Applying migration metadata to the database'));
636638

@@ -642,7 +644,7 @@ export const pull = command({
642644
init,
643645
};
644646

645-
const error = await migrate!(migrateInput);
647+
const error = await migrate(migrateInput);
646648

647649
if (error) {
648650
if (error.exitCode === 'localMigrations') {

0 commit comments

Comments
 (0)