drizzle-kit 0.21.4 → 0.22.0-12a1bf8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.cjs +789 -266
- package/index.d.mts +5 -3
- package/index.d.ts +5 -3
- package/package.json +4 -4
- package/payload.d.mts +96 -10
- package/payload.d.ts +96 -10
- package/payload.js +2202 -1242
- package/payload.mjs +2236 -1269
- package/utils-studio.js +175 -23
- package/utils-studio.mjs +175 -23
- package/utils.js +118 -8
- package/utils.mjs +117 -8
package/index.d.mts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { SslOptions } from 'mysql2';
|
2
2
|
import * as zod from 'zod';
|
3
3
|
import { TypeOf } from 'zod';
|
4
|
+
import { ConnectionOptions } from 'tls';
|
4
5
|
|
5
6
|
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
7
|
type Driver = TypeOf<typeof driver>;
|
@@ -107,6 +108,7 @@ type Config = {
|
|
107
108
|
out?: string;
|
108
109
|
breakpoints?: boolean;
|
109
110
|
tablesFilter?: string | string[];
|
111
|
+
extensionsFilters?: "postgis"[];
|
110
112
|
schemaFilter?: string | string[];
|
111
113
|
schema?: string | string[];
|
112
114
|
verbose?: boolean;
|
@@ -132,14 +134,14 @@ type Config = {
|
|
132
134
|
};
|
133
135
|
} | {
|
134
136
|
dialect: Verify<Dialect, "postgresql">;
|
135
|
-
dbCredentials: {
|
137
|
+
dbCredentials: ({
|
136
138
|
host: string;
|
137
139
|
port?: number;
|
138
140
|
user?: string;
|
139
141
|
password?: string;
|
140
142
|
database: string;
|
141
|
-
ssl?: boolean;
|
142
|
-
} | {
|
143
|
+
ssl?: boolean | "require" | "allow" | "prefer" | "verify-full" | ConnectionOptions;
|
144
|
+
} & {}) | {
|
143
145
|
url: string;
|
144
146
|
};
|
145
147
|
} | {
|
package/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { SslOptions } from 'mysql2';
|
2
2
|
import * as zod from 'zod';
|
3
3
|
import { TypeOf } from 'zod';
|
4
|
+
import { ConnectionOptions } from 'tls';
|
4
5
|
|
5
6
|
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
7
|
type Driver = TypeOf<typeof driver>;
|
@@ -107,6 +108,7 @@ type Config = {
|
|
107
108
|
out?: string;
|
108
109
|
breakpoints?: boolean;
|
109
110
|
tablesFilter?: string | string[];
|
111
|
+
extensionsFilters?: "postgis"[];
|
110
112
|
schemaFilter?: string | string[];
|
111
113
|
schema?: string | string[];
|
112
114
|
verbose?: boolean;
|
@@ -132,14 +134,14 @@ type Config = {
|
|
132
134
|
};
|
133
135
|
} | {
|
134
136
|
dialect: Verify<Dialect, "postgresql">;
|
135
|
-
dbCredentials: {
|
137
|
+
dbCredentials: ({
|
136
138
|
host: string;
|
137
139
|
port?: number;
|
138
140
|
user?: string;
|
139
141
|
password?: string;
|
140
142
|
database: string;
|
141
|
-
ssl?: boolean;
|
142
|
-
} | {
|
143
|
+
ssl?: boolean | "require" | "allow" | "prefer" | "verify-full" | ConnectionOptions;
|
144
|
+
} & {}) | {
|
143
145
|
url: string;
|
144
146
|
};
|
145
147
|
} | {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.22.0-12a1bf8",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -60,8 +60,8 @@
|
|
60
60
|
"chalk": "^5.2.0",
|
61
61
|
"dockerode": "^3.3.4",
|
62
62
|
"dotenv": "^16.0.3",
|
63
|
-
"drizzle-kit": "0.
|
64
|
-
"drizzle-orm": "0.
|
63
|
+
"drizzle-kit": "0.21.2",
|
64
|
+
"drizzle-orm": "0.31.0-6df4b83",
|
65
65
|
"esbuild-node-externals": "^1.9.0",
|
66
66
|
"eslint": "^8.57.0",
|
67
67
|
"eslint-config-prettier": "^9.1.0",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"minimatch": "^7.4.3",
|
72
72
|
"mysql2": "2.3.3",
|
73
73
|
"node-fetch": "^3.3.2",
|
74
|
-
"pg": "^8.11.
|
74
|
+
"pg": "^8.11.5",
|
75
75
|
"pluralize": "^8.0.0",
|
76
76
|
"postgres": "^3.4.4",
|
77
77
|
"prettier": "^2.8.1",
|
package/payload.d.mts
CHANGED
@@ -5,7 +5,7 @@ import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
5
5
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
6
6
|
|
7
7
|
declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
8
|
-
version: zod.ZodLiteral<"
|
8
|
+
version: zod.ZodLiteral<"7">;
|
9
9
|
dialect: zod.ZodLiteral<"postgresql">;
|
10
10
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
11
11
|
name: zod.ZodString;
|
@@ -43,16 +43,58 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
43
43
|
}>>;
|
44
44
|
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
45
45
|
name: zod.ZodString;
|
46
|
-
columns: zod.ZodArray<zod.
|
46
|
+
columns: zod.ZodArray<zod.ZodObject<{
|
47
|
+
expression: zod.ZodString;
|
48
|
+
isExpression: zod.ZodBoolean;
|
49
|
+
asc: zod.ZodBoolean;
|
50
|
+
nulls: zod.ZodOptional<zod.ZodString>;
|
51
|
+
opclass: zod.ZodOptional<zod.ZodString>;
|
52
|
+
}, "strip", zod.ZodTypeAny, {
|
53
|
+
expression: string;
|
54
|
+
isExpression: boolean;
|
55
|
+
asc: boolean;
|
56
|
+
nulls?: string | undefined;
|
57
|
+
opclass?: string | undefined;
|
58
|
+
}, {
|
59
|
+
expression: string;
|
60
|
+
isExpression: boolean;
|
61
|
+
asc: boolean;
|
62
|
+
nulls?: string | undefined;
|
63
|
+
opclass?: string | undefined;
|
64
|
+
}>, "many">;
|
47
65
|
isUnique: zod.ZodBoolean;
|
66
|
+
with: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
67
|
+
method: zod.ZodDefault<zod.ZodString>;
|
68
|
+
where: zod.ZodOptional<zod.ZodString>;
|
69
|
+
concurrently: zod.ZodDefault<zod.ZodBoolean>;
|
48
70
|
}, "strict", zod.ZodTypeAny, {
|
49
71
|
name: string;
|
50
|
-
columns:
|
72
|
+
columns: {
|
73
|
+
expression: string;
|
74
|
+
isExpression: boolean;
|
75
|
+
asc: boolean;
|
76
|
+
nulls?: string | undefined;
|
77
|
+
opclass?: string | undefined;
|
78
|
+
}[];
|
51
79
|
isUnique: boolean;
|
80
|
+
method: string;
|
81
|
+
concurrently: boolean;
|
82
|
+
with?: Record<string, any> | undefined;
|
83
|
+
where?: string | undefined;
|
52
84
|
}, {
|
53
85
|
name: string;
|
54
|
-
columns:
|
86
|
+
columns: {
|
87
|
+
expression: string;
|
88
|
+
isExpression: boolean;
|
89
|
+
asc: boolean;
|
90
|
+
nulls?: string | undefined;
|
91
|
+
opclass?: string | undefined;
|
92
|
+
}[];
|
55
93
|
isUnique: boolean;
|
94
|
+
with?: Record<string, any> | undefined;
|
95
|
+
method?: string | undefined;
|
96
|
+
where?: string | undefined;
|
97
|
+
concurrently?: boolean | undefined;
|
56
98
|
}>>;
|
57
99
|
foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
58
100
|
name: zod.ZodString;
|
@@ -120,8 +162,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
120
162
|
}>;
|
121
163
|
indexes: Record<string, {
|
122
164
|
name: string;
|
123
|
-
columns:
|
165
|
+
columns: {
|
166
|
+
expression: string;
|
167
|
+
isExpression: boolean;
|
168
|
+
asc: boolean;
|
169
|
+
nulls?: string | undefined;
|
170
|
+
opclass?: string | undefined;
|
171
|
+
}[];
|
124
172
|
isUnique: boolean;
|
173
|
+
method: string;
|
174
|
+
concurrently: boolean;
|
175
|
+
with?: Record<string, any> | undefined;
|
176
|
+
where?: string | undefined;
|
125
177
|
}>;
|
126
178
|
foreignKeys: Record<string, {
|
127
179
|
name: string;
|
@@ -158,8 +210,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
158
210
|
}>;
|
159
211
|
indexes: Record<string, {
|
160
212
|
name: string;
|
161
|
-
columns:
|
213
|
+
columns: {
|
214
|
+
expression: string;
|
215
|
+
isExpression: boolean;
|
216
|
+
asc: boolean;
|
217
|
+
nulls?: string | undefined;
|
218
|
+
opclass?: string | undefined;
|
219
|
+
}[];
|
162
220
|
isUnique: boolean;
|
221
|
+
with?: Record<string, any> | undefined;
|
222
|
+
method?: string | undefined;
|
223
|
+
where?: string | undefined;
|
224
|
+
concurrently?: boolean | undefined;
|
163
225
|
}>;
|
164
226
|
foreignKeys: Record<string, {
|
165
227
|
name: string;
|
@@ -273,8 +335,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
273
335
|
}>;
|
274
336
|
indexes: Record<string, {
|
275
337
|
name: string;
|
276
|
-
columns:
|
338
|
+
columns: {
|
339
|
+
expression: string;
|
340
|
+
isExpression: boolean;
|
341
|
+
asc: boolean;
|
342
|
+
nulls?: string | undefined;
|
343
|
+
opclass?: string | undefined;
|
344
|
+
}[];
|
277
345
|
isUnique: boolean;
|
346
|
+
method: string;
|
347
|
+
concurrently: boolean;
|
348
|
+
with?: Record<string, any> | undefined;
|
349
|
+
where?: string | undefined;
|
278
350
|
}>;
|
279
351
|
foreignKeys: Record<string, {
|
280
352
|
name: string;
|
@@ -299,7 +371,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
299
371
|
}>;
|
300
372
|
id: string;
|
301
373
|
prevId: string;
|
302
|
-
version: "
|
374
|
+
version: "7";
|
303
375
|
dialect: "postgresql";
|
304
376
|
schemas: Record<string, string>;
|
305
377
|
_meta: {
|
@@ -337,8 +409,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
337
409
|
}>;
|
338
410
|
indexes: Record<string, {
|
339
411
|
name: string;
|
340
|
-
columns:
|
412
|
+
columns: {
|
413
|
+
expression: string;
|
414
|
+
isExpression: boolean;
|
415
|
+
asc: boolean;
|
416
|
+
nulls?: string | undefined;
|
417
|
+
opclass?: string | undefined;
|
418
|
+
}[];
|
341
419
|
isUnique: boolean;
|
420
|
+
with?: Record<string, any> | undefined;
|
421
|
+
method?: string | undefined;
|
422
|
+
where?: string | undefined;
|
423
|
+
concurrently?: boolean | undefined;
|
342
424
|
}>;
|
343
425
|
foreignKeys: Record<string, {
|
344
426
|
name: string;
|
@@ -363,7 +445,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
363
445
|
}>;
|
364
446
|
id: string;
|
365
447
|
prevId: string;
|
366
|
-
version: "
|
448
|
+
version: "7";
|
367
449
|
dialect: "postgresql";
|
368
450
|
schemas: Record<string, string>;
|
369
451
|
_meta: {
|
@@ -1019,6 +1101,10 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1019
1101
|
name: string;
|
1020
1102
|
columns: string[];
|
1021
1103
|
isUnique: boolean;
|
1104
|
+
method: string;
|
1105
|
+
concurrently: boolean;
|
1106
|
+
with?: Record<string, string> | undefined;
|
1107
|
+
where?: string | undefined;
|
1022
1108
|
}>;
|
1023
1109
|
foreignKeys: Record<string, {
|
1024
1110
|
name: string;
|
package/payload.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { MySql2Database } from 'drizzle-orm/mysql2';
|
|
5
5
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
6
6
|
|
7
7
|
declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
8
|
-
version: zod.ZodLiteral<"
|
8
|
+
version: zod.ZodLiteral<"7">;
|
9
9
|
dialect: zod.ZodLiteral<"postgresql">;
|
10
10
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
11
11
|
name: zod.ZodString;
|
@@ -43,16 +43,58 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
43
43
|
}>>;
|
44
44
|
indexes: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
45
45
|
name: zod.ZodString;
|
46
|
-
columns: zod.ZodArray<zod.
|
46
|
+
columns: zod.ZodArray<zod.ZodObject<{
|
47
|
+
expression: zod.ZodString;
|
48
|
+
isExpression: zod.ZodBoolean;
|
49
|
+
asc: zod.ZodBoolean;
|
50
|
+
nulls: zod.ZodOptional<zod.ZodString>;
|
51
|
+
opclass: zod.ZodOptional<zod.ZodString>;
|
52
|
+
}, "strip", zod.ZodTypeAny, {
|
53
|
+
expression: string;
|
54
|
+
isExpression: boolean;
|
55
|
+
asc: boolean;
|
56
|
+
nulls?: string | undefined;
|
57
|
+
opclass?: string | undefined;
|
58
|
+
}, {
|
59
|
+
expression: string;
|
60
|
+
isExpression: boolean;
|
61
|
+
asc: boolean;
|
62
|
+
nulls?: string | undefined;
|
63
|
+
opclass?: string | undefined;
|
64
|
+
}>, "many">;
|
47
65
|
isUnique: zod.ZodBoolean;
|
66
|
+
with: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
67
|
+
method: zod.ZodDefault<zod.ZodString>;
|
68
|
+
where: zod.ZodOptional<zod.ZodString>;
|
69
|
+
concurrently: zod.ZodDefault<zod.ZodBoolean>;
|
48
70
|
}, "strict", zod.ZodTypeAny, {
|
49
71
|
name: string;
|
50
|
-
columns:
|
72
|
+
columns: {
|
73
|
+
expression: string;
|
74
|
+
isExpression: boolean;
|
75
|
+
asc: boolean;
|
76
|
+
nulls?: string | undefined;
|
77
|
+
opclass?: string | undefined;
|
78
|
+
}[];
|
51
79
|
isUnique: boolean;
|
80
|
+
method: string;
|
81
|
+
concurrently: boolean;
|
82
|
+
with?: Record<string, any> | undefined;
|
83
|
+
where?: string | undefined;
|
52
84
|
}, {
|
53
85
|
name: string;
|
54
|
-
columns:
|
86
|
+
columns: {
|
87
|
+
expression: string;
|
88
|
+
isExpression: boolean;
|
89
|
+
asc: boolean;
|
90
|
+
nulls?: string | undefined;
|
91
|
+
opclass?: string | undefined;
|
92
|
+
}[];
|
55
93
|
isUnique: boolean;
|
94
|
+
with?: Record<string, any> | undefined;
|
95
|
+
method?: string | undefined;
|
96
|
+
where?: string | undefined;
|
97
|
+
concurrently?: boolean | undefined;
|
56
98
|
}>>;
|
57
99
|
foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
58
100
|
name: zod.ZodString;
|
@@ -120,8 +162,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
120
162
|
}>;
|
121
163
|
indexes: Record<string, {
|
122
164
|
name: string;
|
123
|
-
columns:
|
165
|
+
columns: {
|
166
|
+
expression: string;
|
167
|
+
isExpression: boolean;
|
168
|
+
asc: boolean;
|
169
|
+
nulls?: string | undefined;
|
170
|
+
opclass?: string | undefined;
|
171
|
+
}[];
|
124
172
|
isUnique: boolean;
|
173
|
+
method: string;
|
174
|
+
concurrently: boolean;
|
175
|
+
with?: Record<string, any> | undefined;
|
176
|
+
where?: string | undefined;
|
125
177
|
}>;
|
126
178
|
foreignKeys: Record<string, {
|
127
179
|
name: string;
|
@@ -158,8 +210,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
158
210
|
}>;
|
159
211
|
indexes: Record<string, {
|
160
212
|
name: string;
|
161
|
-
columns:
|
213
|
+
columns: {
|
214
|
+
expression: string;
|
215
|
+
isExpression: boolean;
|
216
|
+
asc: boolean;
|
217
|
+
nulls?: string | undefined;
|
218
|
+
opclass?: string | undefined;
|
219
|
+
}[];
|
162
220
|
isUnique: boolean;
|
221
|
+
with?: Record<string, any> | undefined;
|
222
|
+
method?: string | undefined;
|
223
|
+
where?: string | undefined;
|
224
|
+
concurrently?: boolean | undefined;
|
163
225
|
}>;
|
164
226
|
foreignKeys: Record<string, {
|
165
227
|
name: string;
|
@@ -273,8 +335,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
273
335
|
}>;
|
274
336
|
indexes: Record<string, {
|
275
337
|
name: string;
|
276
|
-
columns:
|
338
|
+
columns: {
|
339
|
+
expression: string;
|
340
|
+
isExpression: boolean;
|
341
|
+
asc: boolean;
|
342
|
+
nulls?: string | undefined;
|
343
|
+
opclass?: string | undefined;
|
344
|
+
}[];
|
277
345
|
isUnique: boolean;
|
346
|
+
method: string;
|
347
|
+
concurrently: boolean;
|
348
|
+
with?: Record<string, any> | undefined;
|
349
|
+
where?: string | undefined;
|
278
350
|
}>;
|
279
351
|
foreignKeys: Record<string, {
|
280
352
|
name: string;
|
@@ -299,7 +371,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
299
371
|
}>;
|
300
372
|
id: string;
|
301
373
|
prevId: string;
|
302
|
-
version: "
|
374
|
+
version: "7";
|
303
375
|
dialect: "postgresql";
|
304
376
|
schemas: Record<string, string>;
|
305
377
|
_meta: {
|
@@ -337,8 +409,18 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
337
409
|
}>;
|
338
410
|
indexes: Record<string, {
|
339
411
|
name: string;
|
340
|
-
columns:
|
412
|
+
columns: {
|
413
|
+
expression: string;
|
414
|
+
isExpression: boolean;
|
415
|
+
asc: boolean;
|
416
|
+
nulls?: string | undefined;
|
417
|
+
opclass?: string | undefined;
|
418
|
+
}[];
|
341
419
|
isUnique: boolean;
|
420
|
+
with?: Record<string, any> | undefined;
|
421
|
+
method?: string | undefined;
|
422
|
+
where?: string | undefined;
|
423
|
+
concurrently?: boolean | undefined;
|
342
424
|
}>;
|
343
425
|
foreignKeys: Record<string, {
|
344
426
|
name: string;
|
@@ -363,7 +445,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
363
445
|
}>;
|
364
446
|
id: string;
|
365
447
|
prevId: string;
|
366
|
-
version: "
|
448
|
+
version: "7";
|
367
449
|
dialect: "postgresql";
|
368
450
|
schemas: Record<string, string>;
|
369
451
|
_meta: {
|
@@ -1019,6 +1101,10 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1019
1101
|
name: string;
|
1020
1102
|
columns: string[];
|
1021
1103
|
isUnique: boolean;
|
1104
|
+
method: string;
|
1105
|
+
concurrently: boolean;
|
1106
|
+
with?: Record<string, string> | undefined;
|
1107
|
+
where?: string | undefined;
|
1022
1108
|
}>;
|
1023
1109
|
foreignKeys: Record<string, {
|
1024
1110
|
name: string;
|