drizzle-kit 0.25.0-a5a41e0 → 0.25.0-a88d6b6
Sign up to get free protection for your applications and to get access to all the features.
- package/api.d.mts +364 -36
- package/api.d.ts +364 -36
- package/api.js +16703 -94951
- package/api.mjs +16702 -94946
- package/bin.cjs +2425 -1116
- package/common-DYjgLS6u.d.mts +8 -0
- package/common-DYjgLS6u.d.ts +8 -0
- package/index.d.mts +2 -5
- package/index.d.ts +2 -5
- package/package.json +2 -2
- package/utils.js +77 -22
- package/utils.mjs +76 -22
package/api.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { LibSQLDatabase } from 'drizzle-orm/libsql';
|
2
2
|
import { MySql2Database } from 'drizzle-orm/mysql2';
|
3
3
|
import { PgDatabase } from 'drizzle-orm/pg-core';
|
4
|
+
import { C as CasingType } from './common-DYjgLS6u.js';
|
4
5
|
import * as zod from 'zod';
|
5
6
|
import { TypeOf } from 'zod';
|
6
7
|
|
@@ -119,6 +120,16 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
119
120
|
name: string;
|
120
121
|
columns: string[];
|
121
122
|
}>>>;
|
123
|
+
checkConstraint: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
124
|
+
name: zod.ZodString;
|
125
|
+
value: zod.ZodString;
|
126
|
+
}, "strict", zod.ZodTypeAny, {
|
127
|
+
name: string;
|
128
|
+
value: string;
|
129
|
+
}, {
|
130
|
+
name: string;
|
131
|
+
value: string;
|
132
|
+
}>>>;
|
122
133
|
}, "strict", zod.ZodTypeAny, {
|
123
134
|
name: string;
|
124
135
|
columns: Record<string, {
|
@@ -159,6 +170,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
159
170
|
name: string;
|
160
171
|
columns: string[];
|
161
172
|
}>;
|
173
|
+
checkConstraint: Record<string, {
|
174
|
+
name: string;
|
175
|
+
value: string;
|
176
|
+
}>;
|
162
177
|
}, {
|
163
178
|
name: string;
|
164
179
|
columns: Record<string, {
|
@@ -199,6 +214,102 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
199
214
|
name: string;
|
200
215
|
columns: string[];
|
201
216
|
}> | undefined;
|
217
|
+
checkConstraint?: Record<string, {
|
218
|
+
name: string;
|
219
|
+
value: string;
|
220
|
+
}> | undefined;
|
221
|
+
}>>;
|
222
|
+
views: zod.ZodRecord<zod.ZodString, zod.ZodObject<zod.objectUtil.extendShape<{
|
223
|
+
name: zod.ZodString;
|
224
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
225
|
+
name: zod.ZodString;
|
226
|
+
type: zod.ZodString;
|
227
|
+
primaryKey: zod.ZodBoolean;
|
228
|
+
notNull: zod.ZodBoolean;
|
229
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
230
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
231
|
+
onUpdate: zod.ZodOptional<zod.ZodAny>;
|
232
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
233
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
234
|
+
as: zod.ZodString;
|
235
|
+
}, "strip", zod.ZodTypeAny, {
|
236
|
+
type: "stored" | "virtual";
|
237
|
+
as: string;
|
238
|
+
}, {
|
239
|
+
type: "stored" | "virtual";
|
240
|
+
as: string;
|
241
|
+
}>>;
|
242
|
+
}, "strict", zod.ZodTypeAny, {
|
243
|
+
name: string;
|
244
|
+
type: string;
|
245
|
+
primaryKey: boolean;
|
246
|
+
notNull: boolean;
|
247
|
+
default?: any;
|
248
|
+
onUpdate?: any;
|
249
|
+
autoincrement?: boolean | undefined;
|
250
|
+
generated?: {
|
251
|
+
type: "stored" | "virtual";
|
252
|
+
as: string;
|
253
|
+
} | undefined;
|
254
|
+
}, {
|
255
|
+
name: string;
|
256
|
+
type: string;
|
257
|
+
primaryKey: boolean;
|
258
|
+
notNull: boolean;
|
259
|
+
default?: any;
|
260
|
+
onUpdate?: any;
|
261
|
+
autoincrement?: boolean | undefined;
|
262
|
+
generated?: {
|
263
|
+
type: "stored" | "virtual";
|
264
|
+
as: string;
|
265
|
+
} | undefined;
|
266
|
+
}>>;
|
267
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
268
|
+
isExisting: zod.ZodBoolean;
|
269
|
+
}, {
|
270
|
+
algorithm: zod.ZodEnum<["undefined", "merge", "temptable"]>;
|
271
|
+
sqlSecurity: zod.ZodEnum<["definer", "invoker"]>;
|
272
|
+
withCheckOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
|
273
|
+
}>, "strict", zod.ZodTypeAny, {
|
274
|
+
name: string;
|
275
|
+
columns: Record<string, {
|
276
|
+
name: string;
|
277
|
+
type: string;
|
278
|
+
primaryKey: boolean;
|
279
|
+
notNull: boolean;
|
280
|
+
default?: any;
|
281
|
+
onUpdate?: any;
|
282
|
+
autoincrement?: boolean | undefined;
|
283
|
+
generated?: {
|
284
|
+
type: "stored" | "virtual";
|
285
|
+
as: string;
|
286
|
+
} | undefined;
|
287
|
+
}>;
|
288
|
+
algorithm: "undefined" | "merge" | "temptable";
|
289
|
+
sqlSecurity: "definer" | "invoker";
|
290
|
+
isExisting: boolean;
|
291
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
292
|
+
definition?: string | undefined;
|
293
|
+
}, {
|
294
|
+
name: string;
|
295
|
+
columns: Record<string, {
|
296
|
+
name: string;
|
297
|
+
type: string;
|
298
|
+
primaryKey: boolean;
|
299
|
+
notNull: boolean;
|
300
|
+
default?: any;
|
301
|
+
onUpdate?: any;
|
302
|
+
autoincrement?: boolean | undefined;
|
303
|
+
generated?: {
|
304
|
+
type: "stored" | "virtual";
|
305
|
+
as: string;
|
306
|
+
} | undefined;
|
307
|
+
}>;
|
308
|
+
algorithm: "undefined" | "merge" | "temptable";
|
309
|
+
sqlSecurity: "definer" | "invoker";
|
310
|
+
isExisting: boolean;
|
311
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
312
|
+
definition?: string | undefined;
|
202
313
|
}>>;
|
203
314
|
_meta: zod.ZodObject<{
|
204
315
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
@@ -312,6 +423,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
312
423
|
name: string;
|
313
424
|
columns: string[];
|
314
425
|
}>;
|
426
|
+
checkConstraint: Record<string, {
|
427
|
+
name: string;
|
428
|
+
value: string;
|
429
|
+
}>;
|
315
430
|
}>;
|
316
431
|
id: string;
|
317
432
|
prevId: string;
|
@@ -321,6 +436,27 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
321
436
|
columns: Record<string, string>;
|
322
437
|
tables: Record<string, string>;
|
323
438
|
};
|
439
|
+
views: Record<string, {
|
440
|
+
name: string;
|
441
|
+
columns: Record<string, {
|
442
|
+
name: string;
|
443
|
+
type: string;
|
444
|
+
primaryKey: boolean;
|
445
|
+
notNull: boolean;
|
446
|
+
default?: any;
|
447
|
+
onUpdate?: any;
|
448
|
+
autoincrement?: boolean | undefined;
|
449
|
+
generated?: {
|
450
|
+
type: "stored" | "virtual";
|
451
|
+
as: string;
|
452
|
+
} | undefined;
|
453
|
+
}>;
|
454
|
+
algorithm: "undefined" | "merge" | "temptable";
|
455
|
+
sqlSecurity: "definer" | "invoker";
|
456
|
+
isExisting: boolean;
|
457
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
458
|
+
definition?: string | undefined;
|
459
|
+
}>;
|
324
460
|
internal?: {
|
325
461
|
indexes?: Record<string, {
|
326
462
|
columns: Record<string, {
|
@@ -374,6 +510,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
374
510
|
name: string;
|
375
511
|
columns: string[];
|
376
512
|
}> | undefined;
|
513
|
+
checkConstraint?: Record<string, {
|
514
|
+
name: string;
|
515
|
+
value: string;
|
516
|
+
}> | undefined;
|
377
517
|
}>;
|
378
518
|
id: string;
|
379
519
|
prevId: string;
|
@@ -383,6 +523,27 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
383
523
|
columns: Record<string, string>;
|
384
524
|
tables: Record<string, string>;
|
385
525
|
};
|
526
|
+
views: Record<string, {
|
527
|
+
name: string;
|
528
|
+
columns: Record<string, {
|
529
|
+
name: string;
|
530
|
+
type: string;
|
531
|
+
primaryKey: boolean;
|
532
|
+
notNull: boolean;
|
533
|
+
default?: any;
|
534
|
+
onUpdate?: any;
|
535
|
+
autoincrement?: boolean | undefined;
|
536
|
+
generated?: {
|
537
|
+
type: "stored" | "virtual";
|
538
|
+
as: string;
|
539
|
+
} | undefined;
|
540
|
+
}>;
|
541
|
+
algorithm: "undefined" | "merge" | "temptable";
|
542
|
+
sqlSecurity: "definer" | "invoker";
|
543
|
+
isExisting: boolean;
|
544
|
+
withCheckOption?: "local" | "cascaded" | undefined;
|
545
|
+
definition?: string | undefined;
|
546
|
+
}>;
|
386
547
|
internal?: {
|
387
548
|
indexes?: Record<string, {
|
388
549
|
columns: Record<string, {
|
@@ -613,6 +774,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
613
774
|
columns: string[];
|
614
775
|
nullsNotDistinct: boolean;
|
615
776
|
}>>>;
|
777
|
+
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
778
|
+
name: zod.ZodString;
|
779
|
+
value: zod.ZodString;
|
780
|
+
}, "strict", zod.ZodTypeAny, {
|
781
|
+
name: string;
|
782
|
+
value: string;
|
783
|
+
}, {
|
784
|
+
name: string;
|
785
|
+
value: string;
|
786
|
+
}>>>;
|
616
787
|
}, "strict", zod.ZodTypeAny, {
|
617
788
|
name: string;
|
618
789
|
columns: Record<string, {
|
@@ -676,6 +847,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
676
847
|
columns: string[];
|
677
848
|
nullsNotDistinct: boolean;
|
678
849
|
}>;
|
850
|
+
checkConstraints: Record<string, {
|
851
|
+
name: string;
|
852
|
+
value: string;
|
853
|
+
}>;
|
679
854
|
}, {
|
680
855
|
name: string;
|
681
856
|
columns: Record<string, {
|
@@ -739,6 +914,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
739
914
|
columns: string[];
|
740
915
|
nullsNotDistinct: boolean;
|
741
916
|
}> | undefined;
|
917
|
+
checkConstraints?: Record<string, {
|
918
|
+
name: string;
|
919
|
+
value: string;
|
920
|
+
}> | undefined;
|
742
921
|
}>>;
|
743
922
|
enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
744
923
|
name: zod.ZodString;
|
@@ -963,9 +1142,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
963
1142
|
} | undefined;
|
964
1143
|
}>;
|
965
1144
|
schema: string;
|
966
|
-
materialized: boolean;
|
967
1145
|
isExisting: boolean;
|
1146
|
+
materialized: boolean;
|
968
1147
|
using?: string | undefined;
|
1148
|
+
definition?: string | undefined;
|
969
1149
|
with?: {
|
970
1150
|
checkOption?: "local" | "cascaded" | undefined;
|
971
1151
|
securityBarrier?: boolean | undefined;
|
@@ -989,7 +1169,6 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
989
1169
|
logAutovacuumMinDuration?: number | undefined;
|
990
1170
|
userCatalogTable?: boolean | undefined;
|
991
1171
|
} | undefined;
|
992
|
-
definition?: string | undefined;
|
993
1172
|
withNoData?: boolean | undefined;
|
994
1173
|
tablespace?: string | undefined;
|
995
1174
|
}, {
|
@@ -1021,9 +1200,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1021
1200
|
} | undefined;
|
1022
1201
|
}>;
|
1023
1202
|
schema: string;
|
1024
|
-
materialized: boolean;
|
1025
1203
|
isExisting: boolean;
|
1204
|
+
materialized: boolean;
|
1026
1205
|
using?: string | undefined;
|
1206
|
+
definition?: string | undefined;
|
1027
1207
|
with?: {
|
1028
1208
|
checkOption?: "local" | "cascaded" | undefined;
|
1029
1209
|
securityBarrier?: boolean | undefined;
|
@@ -1047,7 +1227,6 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1047
1227
|
logAutovacuumMinDuration?: number | undefined;
|
1048
1228
|
userCatalogTable?: boolean | undefined;
|
1049
1229
|
} | undefined;
|
1050
|
-
definition?: string | undefined;
|
1051
1230
|
withNoData?: boolean | undefined;
|
1052
1231
|
tablespace?: string | undefined;
|
1053
1232
|
}>>>;
|
@@ -1211,6 +1390,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1211
1390
|
columns: string[];
|
1212
1391
|
nullsNotDistinct: boolean;
|
1213
1392
|
}>;
|
1393
|
+
checkConstraints: Record<string, {
|
1394
|
+
name: string;
|
1395
|
+
value: string;
|
1396
|
+
}>;
|
1214
1397
|
}>;
|
1215
1398
|
id: string;
|
1216
1399
|
prevId: string;
|
@@ -1222,21 +1405,6 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1222
1405
|
tables: Record<string, string>;
|
1223
1406
|
schemas: Record<string, string>;
|
1224
1407
|
};
|
1225
|
-
enums: Record<string, {
|
1226
|
-
name: string;
|
1227
|
-
values: string[];
|
1228
|
-
schema: string;
|
1229
|
-
}>;
|
1230
|
-
sequences: Record<string, {
|
1231
|
-
name: string;
|
1232
|
-
schema: string;
|
1233
|
-
increment?: string | undefined;
|
1234
|
-
minValue?: string | undefined;
|
1235
|
-
maxValue?: string | undefined;
|
1236
|
-
startWith?: string | undefined;
|
1237
|
-
cache?: string | undefined;
|
1238
|
-
cycle?: boolean | undefined;
|
1239
|
-
}>;
|
1240
1408
|
views: Record<string, {
|
1241
1409
|
name: string;
|
1242
1410
|
columns: Record<string, {
|
@@ -1266,9 +1434,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1266
1434
|
} | undefined;
|
1267
1435
|
}>;
|
1268
1436
|
schema: string;
|
1269
|
-
materialized: boolean;
|
1270
1437
|
isExisting: boolean;
|
1438
|
+
materialized: boolean;
|
1271
1439
|
using?: string | undefined;
|
1440
|
+
definition?: string | undefined;
|
1272
1441
|
with?: {
|
1273
1442
|
checkOption?: "local" | "cascaded" | undefined;
|
1274
1443
|
securityBarrier?: boolean | undefined;
|
@@ -1292,10 +1461,24 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1292
1461
|
logAutovacuumMinDuration?: number | undefined;
|
1293
1462
|
userCatalogTable?: boolean | undefined;
|
1294
1463
|
} | undefined;
|
1295
|
-
definition?: string | undefined;
|
1296
1464
|
withNoData?: boolean | undefined;
|
1297
1465
|
tablespace?: string | undefined;
|
1298
1466
|
}>;
|
1467
|
+
enums: Record<string, {
|
1468
|
+
name: string;
|
1469
|
+
values: string[];
|
1470
|
+
schema: string;
|
1471
|
+
}>;
|
1472
|
+
sequences: Record<string, {
|
1473
|
+
name: string;
|
1474
|
+
schema: string;
|
1475
|
+
increment?: string | undefined;
|
1476
|
+
minValue?: string | undefined;
|
1477
|
+
maxValue?: string | undefined;
|
1478
|
+
startWith?: string | undefined;
|
1479
|
+
cache?: string | undefined;
|
1480
|
+
cycle?: boolean | undefined;
|
1481
|
+
}>;
|
1299
1482
|
internal?: {
|
1300
1483
|
tables: Record<string, {
|
1301
1484
|
columns: Record<string, {
|
@@ -1370,6 +1553,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1370
1553
|
columns: string[];
|
1371
1554
|
nullsNotDistinct: boolean;
|
1372
1555
|
}> | undefined;
|
1556
|
+
checkConstraints?: Record<string, {
|
1557
|
+
name: string;
|
1558
|
+
value: string;
|
1559
|
+
}> | undefined;
|
1373
1560
|
}>;
|
1374
1561
|
id: string;
|
1375
1562
|
prevId: string;
|
@@ -1396,16 +1583,6 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1396
1583
|
} | undefined>;
|
1397
1584
|
} | undefined>;
|
1398
1585
|
} | undefined;
|
1399
|
-
sequences?: Record<string, {
|
1400
|
-
name: string;
|
1401
|
-
schema: string;
|
1402
|
-
increment?: string | undefined;
|
1403
|
-
minValue?: string | undefined;
|
1404
|
-
maxValue?: string | undefined;
|
1405
|
-
startWith?: string | undefined;
|
1406
|
-
cache?: string | undefined;
|
1407
|
-
cycle?: boolean | undefined;
|
1408
|
-
}> | undefined;
|
1409
1586
|
views?: Record<string, {
|
1410
1587
|
name: string;
|
1411
1588
|
columns: Record<string, {
|
@@ -1435,9 +1612,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1435
1612
|
} | undefined;
|
1436
1613
|
}>;
|
1437
1614
|
schema: string;
|
1438
|
-
materialized: boolean;
|
1439
1615
|
isExisting: boolean;
|
1616
|
+
materialized: boolean;
|
1440
1617
|
using?: string | undefined;
|
1618
|
+
definition?: string | undefined;
|
1441
1619
|
with?: {
|
1442
1620
|
checkOption?: "local" | "cascaded" | undefined;
|
1443
1621
|
securityBarrier?: boolean | undefined;
|
@@ -1461,10 +1639,19 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1461
1639
|
logAutovacuumMinDuration?: number | undefined;
|
1462
1640
|
userCatalogTable?: boolean | undefined;
|
1463
1641
|
} | undefined;
|
1464
|
-
definition?: string | undefined;
|
1465
1642
|
withNoData?: boolean | undefined;
|
1466
1643
|
tablespace?: string | undefined;
|
1467
1644
|
}> | undefined;
|
1645
|
+
sequences?: Record<string, {
|
1646
|
+
name: string;
|
1647
|
+
schema: string;
|
1648
|
+
increment?: string | undefined;
|
1649
|
+
minValue?: string | undefined;
|
1650
|
+
maxValue?: string | undefined;
|
1651
|
+
startWith?: string | undefined;
|
1652
|
+
cache?: string | undefined;
|
1653
|
+
cycle?: boolean | undefined;
|
1654
|
+
}> | undefined;
|
1468
1655
|
}>;
|
1469
1656
|
type PgSchema = TypeOf<typeof pgSchema>;
|
1470
1657
|
|
@@ -1574,6 +1761,16 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1574
1761
|
name: string;
|
1575
1762
|
columns: string[];
|
1576
1763
|
}>>>;
|
1764
|
+
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
1765
|
+
name: zod.ZodString;
|
1766
|
+
value: zod.ZodString;
|
1767
|
+
}, "strict", zod.ZodTypeAny, {
|
1768
|
+
name: string;
|
1769
|
+
value: string;
|
1770
|
+
}, {
|
1771
|
+
name: string;
|
1772
|
+
value: string;
|
1773
|
+
}>>>;
|
1577
1774
|
}, "strict", zod.ZodTypeAny, {
|
1578
1775
|
name: string;
|
1579
1776
|
columns: Record<string, {
|
@@ -1611,6 +1808,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1611
1808
|
name: string;
|
1612
1809
|
columns: string[];
|
1613
1810
|
}>;
|
1811
|
+
checkConstraints: Record<string, {
|
1812
|
+
name: string;
|
1813
|
+
value: string;
|
1814
|
+
}>;
|
1614
1815
|
}, {
|
1615
1816
|
name: string;
|
1616
1817
|
columns: Record<string, {
|
@@ -1648,6 +1849,87 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1648
1849
|
name: string;
|
1649
1850
|
columns: string[];
|
1650
1851
|
}> | undefined;
|
1852
|
+
checkConstraints?: Record<string, {
|
1853
|
+
name: string;
|
1854
|
+
value: string;
|
1855
|
+
}> | undefined;
|
1856
|
+
}>>;
|
1857
|
+
views: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
1858
|
+
name: zod.ZodString;
|
1859
|
+
columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
1860
|
+
name: zod.ZodString;
|
1861
|
+
type: zod.ZodString;
|
1862
|
+
primaryKey: zod.ZodBoolean;
|
1863
|
+
notNull: zod.ZodBoolean;
|
1864
|
+
autoincrement: zod.ZodOptional<zod.ZodBoolean>;
|
1865
|
+
default: zod.ZodOptional<zod.ZodAny>;
|
1866
|
+
generated: zod.ZodOptional<zod.ZodObject<{
|
1867
|
+
type: zod.ZodEnum<["stored", "virtual"]>;
|
1868
|
+
as: zod.ZodString;
|
1869
|
+
}, "strip", zod.ZodTypeAny, {
|
1870
|
+
type: "stored" | "virtual";
|
1871
|
+
as: string;
|
1872
|
+
}, {
|
1873
|
+
type: "stored" | "virtual";
|
1874
|
+
as: string;
|
1875
|
+
}>>;
|
1876
|
+
}, "strict", zod.ZodTypeAny, {
|
1877
|
+
name: string;
|
1878
|
+
type: string;
|
1879
|
+
primaryKey: boolean;
|
1880
|
+
notNull: boolean;
|
1881
|
+
default?: any;
|
1882
|
+
autoincrement?: boolean | undefined;
|
1883
|
+
generated?: {
|
1884
|
+
type: "stored" | "virtual";
|
1885
|
+
as: string;
|
1886
|
+
} | undefined;
|
1887
|
+
}, {
|
1888
|
+
name: string;
|
1889
|
+
type: string;
|
1890
|
+
primaryKey: boolean;
|
1891
|
+
notNull: boolean;
|
1892
|
+
default?: any;
|
1893
|
+
autoincrement?: boolean | undefined;
|
1894
|
+
generated?: {
|
1895
|
+
type: "stored" | "virtual";
|
1896
|
+
as: string;
|
1897
|
+
} | undefined;
|
1898
|
+
}>>;
|
1899
|
+
definition: zod.ZodOptional<zod.ZodString>;
|
1900
|
+
isExisting: zod.ZodBoolean;
|
1901
|
+
}, "strict", zod.ZodTypeAny, {
|
1902
|
+
name: string;
|
1903
|
+
columns: Record<string, {
|
1904
|
+
name: string;
|
1905
|
+
type: string;
|
1906
|
+
primaryKey: boolean;
|
1907
|
+
notNull: boolean;
|
1908
|
+
default?: any;
|
1909
|
+
autoincrement?: boolean | undefined;
|
1910
|
+
generated?: {
|
1911
|
+
type: "stored" | "virtual";
|
1912
|
+
as: string;
|
1913
|
+
} | undefined;
|
1914
|
+
}>;
|
1915
|
+
isExisting: boolean;
|
1916
|
+
definition?: string | undefined;
|
1917
|
+
}, {
|
1918
|
+
name: string;
|
1919
|
+
columns: Record<string, {
|
1920
|
+
name: string;
|
1921
|
+
type: string;
|
1922
|
+
primaryKey: boolean;
|
1923
|
+
notNull: boolean;
|
1924
|
+
default?: any;
|
1925
|
+
autoincrement?: boolean | undefined;
|
1926
|
+
generated?: {
|
1927
|
+
type: "stored" | "virtual";
|
1928
|
+
as: string;
|
1929
|
+
} | undefined;
|
1930
|
+
}>;
|
1931
|
+
isExisting: boolean;
|
1932
|
+
definition?: string | undefined;
|
1651
1933
|
}>>;
|
1652
1934
|
enums: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
|
1653
1935
|
_meta: zod.ZodObject<{
|
@@ -1732,6 +2014,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1732
2014
|
name: string;
|
1733
2015
|
columns: string[];
|
1734
2016
|
}>;
|
2017
|
+
checkConstraints: Record<string, {
|
2018
|
+
name: string;
|
2019
|
+
value: string;
|
2020
|
+
}>;
|
1735
2021
|
}>;
|
1736
2022
|
id: string;
|
1737
2023
|
prevId: string;
|
@@ -1741,6 +2027,23 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1741
2027
|
columns: Record<string, string>;
|
1742
2028
|
tables: Record<string, string>;
|
1743
2029
|
};
|
2030
|
+
views: Record<string, {
|
2031
|
+
name: string;
|
2032
|
+
columns: Record<string, {
|
2033
|
+
name: string;
|
2034
|
+
type: string;
|
2035
|
+
primaryKey: boolean;
|
2036
|
+
notNull: boolean;
|
2037
|
+
default?: any;
|
2038
|
+
autoincrement?: boolean | undefined;
|
2039
|
+
generated?: {
|
2040
|
+
type: "stored" | "virtual";
|
2041
|
+
as: string;
|
2042
|
+
} | undefined;
|
2043
|
+
}>;
|
2044
|
+
isExisting: boolean;
|
2045
|
+
definition?: string | undefined;
|
2046
|
+
}>;
|
1744
2047
|
enums: {};
|
1745
2048
|
internal?: {
|
1746
2049
|
indexes?: Record<string, {
|
@@ -1787,6 +2090,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1787
2090
|
name: string;
|
1788
2091
|
columns: string[];
|
1789
2092
|
}> | undefined;
|
2093
|
+
checkConstraints?: Record<string, {
|
2094
|
+
name: string;
|
2095
|
+
value: string;
|
2096
|
+
}> | undefined;
|
1790
2097
|
}>;
|
1791
2098
|
id: string;
|
1792
2099
|
prevId: string;
|
@@ -1796,6 +2103,23 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1796
2103
|
columns: Record<string, string>;
|
1797
2104
|
tables: Record<string, string>;
|
1798
2105
|
};
|
2106
|
+
views: Record<string, {
|
2107
|
+
name: string;
|
2108
|
+
columns: Record<string, {
|
2109
|
+
name: string;
|
2110
|
+
type: string;
|
2111
|
+
primaryKey: boolean;
|
2112
|
+
notNull: boolean;
|
2113
|
+
default?: any;
|
2114
|
+
autoincrement?: boolean | undefined;
|
2115
|
+
generated?: {
|
2116
|
+
type: "stored" | "virtual";
|
2117
|
+
as: string;
|
2118
|
+
} | undefined;
|
2119
|
+
}>;
|
2120
|
+
isExisting: boolean;
|
2121
|
+
definition?: string | undefined;
|
2122
|
+
}>;
|
1799
2123
|
enums: {};
|
1800
2124
|
internal?: {
|
1801
2125
|
indexes?: Record<string, {
|
@@ -1810,7 +2134,7 @@ type SQLiteSchema = TypeOf<typeof schema>;
|
|
1810
2134
|
type DrizzleSnapshotJSON = PgSchema;
|
1811
2135
|
type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
1812
2136
|
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
1813
|
-
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[]) => PgSchema;
|
2137
|
+
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
1814
2138
|
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
1815
2139
|
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
|
1816
2140
|
hasDataLoss: boolean;
|
@@ -1818,7 +2142,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
|
|
1818
2142
|
statementsToExecute: string[];
|
1819
2143
|
apply: () => Promise<void>;
|
1820
2144
|
}>;
|
1821
|
-
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchema>;
|
2145
|
+
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SQLiteSchema>;
|
1822
2146
|
declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
1823
2147
|
declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstance: LibSQLDatabase<any>) => Promise<{
|
1824
2148
|
hasDataLoss: boolean;
|
@@ -1826,7 +2150,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
|
|
1826
2150
|
statementsToExecute: string[];
|
1827
2151
|
apply: () => Promise<void>;
|
1828
2152
|
}>;
|
1829
|
-
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySqlSchema>;
|
2153
|
+
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<MySqlSchema>;
|
1830
2154
|
declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
1831
2155
|
declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstance: MySql2Database<any>, databaseName: string) => Promise<{
|
1832
2156
|
hasDataLoss: boolean;
|
@@ -1900,6 +2224,10 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1900
2224
|
columns: string[];
|
1901
2225
|
nullsNotDistinct: boolean;
|
1902
2226
|
}>;
|
2227
|
+
checkConstraints: Record<string, {
|
2228
|
+
value: string;
|
2229
|
+
name: string;
|
2230
|
+
}>;
|
1903
2231
|
}>;
|
1904
2232
|
enums: Record<string, {
|
1905
2233
|
values: string[];
|