drizzle-kit 0.20.5-e91a5f5 → 0.20.5-fd4dd75
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +35428 -33410
- package/cli/commands/pgIntrospect.d.ts +6 -1
- package/cli/commands/pgPushUtils.d.ts +14 -0
- package/cli/commands/sqliteIntrospect.d.ts +6 -1
- package/cli/commands/utils.d.ts +1 -1
- package/cli/selector-ui.d.ts +13 -0
- package/cli/utils.d.ts +12 -0
- package/cli/validations/mysql.d.ts +365 -0
- package/cli/validations/sqlite.d.ts +220 -0
- package/cli/validations/studio.d.ts +593 -0
- package/drivers/index.d.ts +0 -14
- package/global.d.ts +0 -1
- package/introspect-pg.d.ts +12 -0
- package/introspect-sqlite.d.ts +10 -0
- package/orm-extenstions/d1-driver/driver.d.ts +8 -0
- package/orm-extenstions/d1-driver/session.d.ts +51 -0
- package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
- package/package.json +9 -19
- package/serializer/mysqlImports.d.ts +0 -5
- package/serializer/mysqlSerializer.d.ts +2 -2
- package/serializer/sqliteImports.d.ts +0 -4
- package/serializer/studioUtils.d.ts +65 -0
- package/utils-studio.js +1289 -1285
- package/utils-studio.mjs +1337 -1328
- package/utils.d.ts +15 -1
- package/utils.js +54766 -3594
- package/introspect.d.ts +0 -4
- package/payload.js +0 -36761
- package/payload.mjs +0 -36809
- package/sqlite-introspect.d.ts +0 -5
- package/utils.mjs +0 -8055
package/utils.d.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import { Dialect } from "./schemaValidator";
|
2
2
|
import { NamedWithSchema } from "./cli/commands/migrate";
|
3
|
+
import { PgDatabase } from "drizzle-orm/pg-core";
|
4
|
+
import { PgSchema as PgSchemaKit } from "./serializer/pgSchema";
|
5
|
+
import { DbConnection } from ".";
|
3
6
|
export declare const assertV1OutFolder: (out: string, dialect: Dialect | "{dialect}") => void;
|
4
7
|
export type Journal = {
|
5
8
|
version: string;
|
@@ -19,6 +22,7 @@ export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
|
|
19
22
|
snapshots: string[];
|
20
23
|
journal: any;
|
21
24
|
};
|
25
|
+
export declare const mapValues: <IN, OUT>(obj: Record<string, IN>, map: (input: IN) => OUT) => Record<string, OUT>;
|
22
26
|
export declare const validateWithReport: (snapshots: string[], dialect: Dialect) => {
|
23
27
|
malformed: string[];
|
24
28
|
nonLatest: string[];
|
@@ -195,3 +199,13 @@ export declare const statementsForDiffs: (in1: any, in2: any) => Promise<{
|
|
195
199
|
columns: {};
|
196
200
|
} | undefined;
|
197
201
|
}>;
|
202
|
+
export type DrizzleSnapshotJSON = PgSchemaKit;
|
203
|
+
export declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => PgSchemaKit;
|
204
|
+
export declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
205
|
+
export declare const pushSchema: (imports: Record<string, unknown>, db: PgDatabase<any>) => Promise<{
|
206
|
+
hasDataLoss: boolean;
|
207
|
+
warnings: string[];
|
208
|
+
statementsToExecute: string[];
|
209
|
+
apply: () => Promise<void>;
|
210
|
+
}>;
|
211
|
+
export declare const prepareFrom: (connection: DbConnection) => Promise<Record<string, any>>;
|