drizzle-kit 0.20.16 → 0.20.17-14a4eaa
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +87694 -47618
- package/cli/commands/migrate.d.ts +123 -106
- package/cli/commands/mysqlIntrospect.d.ts +2 -71
- package/cli/commands/mysqlPushUtils.d.ts +4 -8
- package/cli/commands/pgIntrospect.d.ts +7 -71
- package/cli/commands/pgPushUtils.d.ts +3 -6
- package/cli/commands/sqliteIntrospect.d.ts +13 -17
- package/cli/commands/sqlitePushUtils.d.ts +4 -10
- package/cli/commands/utils.d.ts +39 -255
- package/cli/connections.d.ts +13 -0
- package/cli/utils.d.ts +13 -0
- package/cli/validations/cli.d.ts +169 -0
- package/cli/validations/common.d.ts +208 -7
- package/cli/validations/mysql.d.ts +6 -342
- package/cli/validations/outputs.d.ts +3 -2
- package/cli/validations/pg.d.ts +16 -408
- package/cli/validations/sqlite.d.ts +22 -0
- package/cli/views.d.ts +7 -5
- package/global.d.ts +3 -1
- package/index.d.mts +25 -63
- package/index.d.ts +25 -63
- package/index.js +1 -0
- package/introspect-sqlite.d.ts +2 -2
- package/jsonDiffer.d.ts +14 -29
- package/jsonStatements.d.ts +38 -11
- package/package.json +29 -51
- package/payload.d.mts +5 -5
- package/payload.d.ts +5 -5
- package/payload.js +16600 -33803
- package/payload.mjs +16695 -33909
- package/schemaValidator.d.ts +74 -71
- package/serializer/mysqlImports.d.ts +3 -7
- package/serializer/mysqlSchema.d.ts +1404 -587
- package/serializer/mysqlSerializer.d.ts +6 -6
- package/serializer/pgImports.d.ts +2 -2
- package/serializer/pgSchema.d.ts +1268 -809
- package/serializer/pgSerializer.d.ts +2 -2
- package/serializer/sqliteImports.d.ts +2 -4
- package/serializer/sqliteSchema.d.ts +144 -570
- package/serializer/sqliteSerializer.d.ts +4 -4
- package/serializer/studio.d.ts +51 -0
- package/snapshotsDiffer.d.ts +2333 -1057
- package/utils/words.d.ts +1 -1
- package/utils-studio.d.mts +0 -1
- package/utils-studio.d.ts +0 -1
- package/utils-studio.js +3818 -170
- package/utils-studio.mjs +3818 -173
- package/utils.d.ts +20 -141
- package/utils.js +3904 -7075
- package/utils.mjs +3977 -7148
- package/cli/commands/mysqlUp.d.ts +0 -4
- package/cli/commands/pgConnect.d.ts +0 -5
- package/cli/commands/pgUp.d.ts +0 -4
- package/cli/commands/sqliteUtils.d.ts +0 -162
- package/cli/commands/upFolders.d.ts +0 -27
- package/drivers/index.d.ts +0 -39
- package/introspect-mysql.d.ts +0 -9
- package/introspect-pg.d.ts +0 -12
package/utils.d.ts
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
import type { Dialect } from "./schemaValidator";
|
2
|
-
import { NamedWithSchema } from "./cli/commands/migrate";
|
3
|
-
|
2
|
+
import type { NamedWithSchema } from "./cli/commands/migrate";
|
3
|
+
import type { ProxyParams } from "./serializer/studio";
|
4
|
+
import type { RunResult } from "better-sqlite3";
|
5
|
+
export type Proxy = (params: ProxyParams) => Promise<any[]>;
|
6
|
+
export type SqliteProxy = {
|
7
|
+
proxy: (params: ProxyParams) => Promise<any[] | RunResult>;
|
8
|
+
};
|
9
|
+
export type DB = {
|
10
|
+
query: <T extends any = any>(sql: string, params?: any[]) => Promise<T[]>;
|
11
|
+
};
|
12
|
+
export type SQLiteDB = {
|
13
|
+
query: <T extends any = any>(sql: string, params?: any[]) => Promise<T[]>;
|
14
|
+
run(query: string): Promise<void>;
|
15
|
+
};
|
16
|
+
export declare const copy: <T>(it: T) => T;
|
17
|
+
export declare const objectValues: <T extends object>(obj: T) => Array<T[keyof T]>;
|
18
|
+
export declare const assertV1OutFolder: (out: string) => void;
|
4
19
|
export type Journal = {
|
5
20
|
version: string;
|
6
21
|
dialect: Dialect;
|
@@ -13,7 +28,6 @@ export type Journal = {
|
|
13
28
|
}[];
|
14
29
|
};
|
15
30
|
export declare const dryJournal: (dialect: Dialect) => Journal;
|
16
|
-
export declare const snapshotsPriorV4: (out: string) => string[];
|
17
31
|
export declare const prepareOutFolder: (out: string, dialect: Dialect) => {
|
18
32
|
meta: string;
|
19
33
|
snapshots: string[];
|
@@ -50,9 +64,9 @@ export declare const prepareMigrationMeta: (schemas: {
|
|
50
64
|
column: string;
|
51
65
|
};
|
52
66
|
}[]) => {
|
53
|
-
schemas:
|
54
|
-
tables:
|
55
|
-
columns:
|
67
|
+
schemas: Record<string, string>;
|
68
|
+
tables: Record<string, string>;
|
69
|
+
columns: Record<string, string>;
|
56
70
|
};
|
57
71
|
export declare const schemaRenameKey: (it: string) => string;
|
58
72
|
export declare const tableRenameKey: (it: NamedWithSchema) => string;
|
@@ -62,138 +76,3 @@ export declare const kloudMeta: () => {
|
|
62
76
|
mysql: number[];
|
63
77
|
sqlite: number[];
|
64
78
|
};
|
65
|
-
export declare const statementsForDiffs: (in1: any, in2: any) => Promise<{
|
66
|
-
left: {
|
67
|
-
internal?: {
|
68
|
-
tables: Record<string, {
|
69
|
-
columns: Record<string, {
|
70
|
-
isArray?: boolean | undefined;
|
71
|
-
dimensions?: number | undefined;
|
72
|
-
rawType?: string | undefined;
|
73
|
-
} | undefined>;
|
74
|
-
} | undefined>;
|
75
|
-
} | undefined;
|
76
|
-
id: string;
|
77
|
-
prevId: string;
|
78
|
-
version: "5";
|
79
|
-
dialect: "pg";
|
80
|
-
tables: Record<string, {
|
81
|
-
name: string;
|
82
|
-
columns: Record<string, {
|
83
|
-
isUnique?: any;
|
84
|
-
default?: any;
|
85
|
-
uniqueName?: string | undefined;
|
86
|
-
nullsNotDistinct?: boolean | undefined;
|
87
|
-
name: string;
|
88
|
-
type: string;
|
89
|
-
primaryKey: boolean;
|
90
|
-
notNull: boolean;
|
91
|
-
}>;
|
92
|
-
indexes: Record<string, {
|
93
|
-
name: string;
|
94
|
-
columns: string[];
|
95
|
-
isUnique: boolean;
|
96
|
-
}>;
|
97
|
-
foreignKeys: Record<string, {
|
98
|
-
onUpdate?: string | undefined;
|
99
|
-
onDelete?: string | undefined;
|
100
|
-
schemaTo?: string | undefined;
|
101
|
-
name: string;
|
102
|
-
tableFrom: string;
|
103
|
-
columnsFrom: string[];
|
104
|
-
tableTo: string;
|
105
|
-
columnsTo: string[];
|
106
|
-
}>;
|
107
|
-
schema: string;
|
108
|
-
compositePrimaryKeys: Record<string, {
|
109
|
-
name: string;
|
110
|
-
columns: string[];
|
111
|
-
}>;
|
112
|
-
uniqueConstraints: Record<string, {
|
113
|
-
name: string;
|
114
|
-
columns: string[];
|
115
|
-
nullsNotDistinct: boolean;
|
116
|
-
}>;
|
117
|
-
}>;
|
118
|
-
schemas: Record<string, string>;
|
119
|
-
_meta: {
|
120
|
-
columns: Record<string, string>;
|
121
|
-
tables: Record<string, string>;
|
122
|
-
schemas: Record<string, string>;
|
123
|
-
};
|
124
|
-
enums: Record<string, {
|
125
|
-
name: string;
|
126
|
-
values: Record<string, string>;
|
127
|
-
}>;
|
128
|
-
};
|
129
|
-
right: {
|
130
|
-
internal?: {
|
131
|
-
tables: Record<string, {
|
132
|
-
columns: Record<string, {
|
133
|
-
isArray?: boolean | undefined;
|
134
|
-
dimensions?: number | undefined;
|
135
|
-
rawType?: string | undefined;
|
136
|
-
} | undefined>;
|
137
|
-
} | undefined>;
|
138
|
-
} | undefined;
|
139
|
-
id: string;
|
140
|
-
prevId: string;
|
141
|
-
version: "5";
|
142
|
-
dialect: "pg";
|
143
|
-
tables: Record<string, {
|
144
|
-
name: string;
|
145
|
-
columns: Record<string, {
|
146
|
-
isUnique?: any;
|
147
|
-
default?: any;
|
148
|
-
uniqueName?: string | undefined;
|
149
|
-
nullsNotDistinct?: boolean | undefined;
|
150
|
-
name: string;
|
151
|
-
type: string;
|
152
|
-
primaryKey: boolean;
|
153
|
-
notNull: boolean;
|
154
|
-
}>;
|
155
|
-
indexes: Record<string, {
|
156
|
-
name: string;
|
157
|
-
columns: string[];
|
158
|
-
isUnique: boolean;
|
159
|
-
}>;
|
160
|
-
foreignKeys: Record<string, {
|
161
|
-
onUpdate?: string | undefined;
|
162
|
-
onDelete?: string | undefined;
|
163
|
-
schemaTo?: string | undefined;
|
164
|
-
name: string;
|
165
|
-
tableFrom: string;
|
166
|
-
columnsFrom: string[];
|
167
|
-
tableTo: string;
|
168
|
-
columnsTo: string[];
|
169
|
-
}>;
|
170
|
-
schema: string;
|
171
|
-
compositePrimaryKeys: Record<string, {
|
172
|
-
name: string;
|
173
|
-
columns: string[];
|
174
|
-
}>;
|
175
|
-
uniqueConstraints: Record<string, {
|
176
|
-
name: string;
|
177
|
-
columns: string[];
|
178
|
-
nullsNotDistinct: boolean;
|
179
|
-
}>;
|
180
|
-
}>;
|
181
|
-
schemas: Record<string, string>;
|
182
|
-
_meta: {
|
183
|
-
columns: Record<string, string>;
|
184
|
-
tables: Record<string, string>;
|
185
|
-
schemas: Record<string, string>;
|
186
|
-
};
|
187
|
-
enums: Record<string, {
|
188
|
-
name: string;
|
189
|
-
values: Record<string, string>;
|
190
|
-
}>;
|
191
|
-
};
|
192
|
-
statements: import("./jsonStatements").JsonStatement[];
|
193
|
-
sqlStatements: string[];
|
194
|
-
_meta: {
|
195
|
-
schemas: {};
|
196
|
-
tables: {};
|
197
|
-
columns: {};
|
198
|
-
} | undefined;
|
199
|
-
}>;
|