drizzle-kit 0.25.0-5a1c5d3 → 0.25.0-662aa35
Sign up to get free protection for your applications and to get access to all the features.
- package/api.d.mts +84 -69
- package/api.d.ts +84 -69
- package/api.js +16911 -89663
- package/api.mjs +16911 -89660
- package/bin.cjs +1768 -1333
- package/common-DYjgLS6u.d.mts +8 -0
- package/common-DYjgLS6u.d.ts +8 -0
- package/index.d.mts +9 -5
- package/index.d.ts +9 -5
- package/package.json +3 -3
- package/utils.js +31 -23
- package/utils.mjs +30 -23
package/api.d.mts
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.mjs';
|
4
5
|
import * as zod from 'zod';
|
5
6
|
import { TypeOf } from 'zod';
|
6
7
|
|
@@ -119,16 +120,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
119
120
|
name: string;
|
120
121
|
columns: string[];
|
121
122
|
}>>>;
|
122
|
-
checkConstraint: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
123
|
-
name: zod.ZodString;
|
124
|
-
value: zod.ZodString;
|
125
|
-
}, "strict", zod.ZodTypeAny, {
|
126
|
-
name: string;
|
127
|
-
value: string;
|
128
|
-
}, {
|
129
|
-
name: string;
|
130
|
-
value: string;
|
131
|
-
}>>>;
|
132
123
|
}, "strict", zod.ZodTypeAny, {
|
133
124
|
name: string;
|
134
125
|
columns: Record<string, {
|
@@ -169,10 +160,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
169
160
|
name: string;
|
170
161
|
columns: string[];
|
171
162
|
}>;
|
172
|
-
checkConstraint: Record<string, {
|
173
|
-
name: string;
|
174
|
-
value: string;
|
175
|
-
}>;
|
176
163
|
}, {
|
177
164
|
name: string;
|
178
165
|
columns: Record<string, {
|
@@ -213,10 +200,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
213
200
|
name: string;
|
214
201
|
columns: string[];
|
215
202
|
}> | undefined;
|
216
|
-
checkConstraint?: Record<string, {
|
217
|
-
name: string;
|
218
|
-
value: string;
|
219
|
-
}> | undefined;
|
220
203
|
}>>;
|
221
204
|
_meta: zod.ZodObject<{
|
222
205
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
@@ -330,10 +313,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
330
313
|
name: string;
|
331
314
|
columns: string[];
|
332
315
|
}>;
|
333
|
-
checkConstraint: Record<string, {
|
334
|
-
name: string;
|
335
|
-
value: string;
|
336
|
-
}>;
|
337
316
|
}>;
|
338
317
|
id: string;
|
339
318
|
prevId: string;
|
@@ -396,10 +375,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
396
375
|
name: string;
|
397
376
|
columns: string[];
|
398
377
|
}> | undefined;
|
399
|
-
checkConstraint?: Record<string, {
|
400
|
-
name: string;
|
401
|
-
value: string;
|
402
|
-
}> | undefined;
|
403
378
|
}>;
|
404
379
|
id: string;
|
405
380
|
prevId: string;
|
@@ -639,15 +614,27 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
639
614
|
columns: string[];
|
640
615
|
nullsNotDistinct: boolean;
|
641
616
|
}>>>;
|
642
|
-
|
617
|
+
policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
643
618
|
name: zod.ZodString;
|
644
|
-
|
619
|
+
as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
|
620
|
+
for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
|
621
|
+
to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
622
|
+
using: zod.ZodOptional<zod.ZodString>;
|
623
|
+
withCheck: zod.ZodOptional<zod.ZodString>;
|
645
624
|
}, "strict", zod.ZodTypeAny, {
|
646
625
|
name: string;
|
647
|
-
|
626
|
+
using?: string | undefined;
|
627
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
628
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
629
|
+
to?: string[] | undefined;
|
630
|
+
withCheck?: string | undefined;
|
648
631
|
}, {
|
649
632
|
name: string;
|
650
|
-
|
633
|
+
using?: string | undefined;
|
634
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
635
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
636
|
+
to?: string[] | undefined;
|
637
|
+
withCheck?: string | undefined;
|
651
638
|
}>>>;
|
652
639
|
}, "strict", zod.ZodTypeAny, {
|
653
640
|
name: string;
|
@@ -712,9 +699,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
712
699
|
columns: string[];
|
713
700
|
nullsNotDistinct: boolean;
|
714
701
|
}>;
|
715
|
-
|
702
|
+
policies: Record<string, {
|
716
703
|
name: string;
|
717
|
-
|
704
|
+
using?: string | undefined;
|
705
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
706
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
707
|
+
to?: string[] | undefined;
|
708
|
+
withCheck?: string | undefined;
|
718
709
|
}>;
|
719
710
|
}, {
|
720
711
|
name: string;
|
@@ -779,9 +770,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
779
770
|
columns: string[];
|
780
771
|
nullsNotDistinct: boolean;
|
781
772
|
}> | undefined;
|
782
|
-
|
773
|
+
policies?: Record<string, {
|
783
774
|
name: string;
|
784
|
-
|
775
|
+
using?: string | undefined;
|
776
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
777
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
778
|
+
to?: string[] | undefined;
|
779
|
+
withCheck?: string | undefined;
|
785
780
|
}> | undefined;
|
786
781
|
}>>;
|
787
782
|
enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
@@ -826,6 +821,22 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
826
821
|
cache?: string | undefined;
|
827
822
|
cycle?: boolean | undefined;
|
828
823
|
}>>>;
|
824
|
+
roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
825
|
+
name: zod.ZodString;
|
826
|
+
createDb: zod.ZodOptional<zod.ZodBoolean>;
|
827
|
+
createRole: zod.ZodOptional<zod.ZodBoolean>;
|
828
|
+
inherit: zod.ZodOptional<zod.ZodBoolean>;
|
829
|
+
}, "strict", zod.ZodTypeAny, {
|
830
|
+
name: string;
|
831
|
+
createDb?: boolean | undefined;
|
832
|
+
createRole?: boolean | undefined;
|
833
|
+
inherit?: boolean | undefined;
|
834
|
+
}, {
|
835
|
+
name: string;
|
836
|
+
createDb?: boolean | undefined;
|
837
|
+
createRole?: boolean | undefined;
|
838
|
+
inherit?: boolean | undefined;
|
839
|
+
}>>>;
|
829
840
|
_meta: zod.ZodObject<{
|
830
841
|
schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
831
842
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
@@ -958,9 +969,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
958
969
|
columns: string[];
|
959
970
|
nullsNotDistinct: boolean;
|
960
971
|
}>;
|
961
|
-
|
972
|
+
policies: Record<string, {
|
962
973
|
name: string;
|
963
|
-
|
974
|
+
using?: string | undefined;
|
975
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
976
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
977
|
+
to?: string[] | undefined;
|
978
|
+
withCheck?: string | undefined;
|
964
979
|
}>;
|
965
980
|
}>;
|
966
981
|
id: string;
|
@@ -988,6 +1003,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
988
1003
|
cache?: string | undefined;
|
989
1004
|
cycle?: boolean | undefined;
|
990
1005
|
}>;
|
1006
|
+
roles: Record<string, {
|
1007
|
+
name: string;
|
1008
|
+
createDb?: boolean | undefined;
|
1009
|
+
createRole?: boolean | undefined;
|
1010
|
+
inherit?: boolean | undefined;
|
1011
|
+
}>;
|
991
1012
|
internal?: {
|
992
1013
|
tables: Record<string, {
|
993
1014
|
columns: Record<string, {
|
@@ -1062,9 +1083,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1062
1083
|
columns: string[];
|
1063
1084
|
nullsNotDistinct: boolean;
|
1064
1085
|
}> | undefined;
|
1065
|
-
|
1086
|
+
policies?: Record<string, {
|
1066
1087
|
name: string;
|
1067
|
-
|
1088
|
+
using?: string | undefined;
|
1089
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
1090
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
1091
|
+
to?: string[] | undefined;
|
1092
|
+
withCheck?: string | undefined;
|
1068
1093
|
}> | undefined;
|
1069
1094
|
}>;
|
1070
1095
|
id: string;
|
@@ -1102,6 +1127,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1102
1127
|
cache?: string | undefined;
|
1103
1128
|
cycle?: boolean | undefined;
|
1104
1129
|
}> | undefined;
|
1130
|
+
roles?: Record<string, {
|
1131
|
+
name: string;
|
1132
|
+
createDb?: boolean | undefined;
|
1133
|
+
createRole?: boolean | undefined;
|
1134
|
+
inherit?: boolean | undefined;
|
1135
|
+
}> | undefined;
|
1105
1136
|
}>;
|
1106
1137
|
type PgSchema = TypeOf<typeof pgSchema>;
|
1107
1138
|
|
@@ -1211,16 +1242,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1211
1242
|
name: string;
|
1212
1243
|
columns: string[];
|
1213
1244
|
}>>>;
|
1214
|
-
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
1215
|
-
name: zod.ZodString;
|
1216
|
-
value: zod.ZodString;
|
1217
|
-
}, "strict", zod.ZodTypeAny, {
|
1218
|
-
name: string;
|
1219
|
-
value: string;
|
1220
|
-
}, {
|
1221
|
-
name: string;
|
1222
|
-
value: string;
|
1223
|
-
}>>>;
|
1224
1245
|
}, "strict", zod.ZodTypeAny, {
|
1225
1246
|
name: string;
|
1226
1247
|
columns: Record<string, {
|
@@ -1258,10 +1279,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1258
1279
|
name: string;
|
1259
1280
|
columns: string[];
|
1260
1281
|
}>;
|
1261
|
-
checkConstraints: Record<string, {
|
1262
|
-
name: string;
|
1263
|
-
value: string;
|
1264
|
-
}>;
|
1265
1282
|
}, {
|
1266
1283
|
name: string;
|
1267
1284
|
columns: Record<string, {
|
@@ -1299,10 +1316,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1299
1316
|
name: string;
|
1300
1317
|
columns: string[];
|
1301
1318
|
}> | undefined;
|
1302
|
-
checkConstraints?: Record<string, {
|
1303
|
-
name: string;
|
1304
|
-
value: string;
|
1305
|
-
}> | undefined;
|
1306
1319
|
}>>;
|
1307
1320
|
enums: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
|
1308
1321
|
_meta: zod.ZodObject<{
|
@@ -1387,10 +1400,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1387
1400
|
name: string;
|
1388
1401
|
columns: string[];
|
1389
1402
|
}>;
|
1390
|
-
checkConstraints: Record<string, {
|
1391
|
-
name: string;
|
1392
|
-
value: string;
|
1393
|
-
}>;
|
1394
1403
|
}>;
|
1395
1404
|
id: string;
|
1396
1405
|
prevId: string;
|
@@ -1446,10 +1455,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1446
1455
|
name: string;
|
1447
1456
|
columns: string[];
|
1448
1457
|
}> | undefined;
|
1449
|
-
checkConstraints?: Record<string, {
|
1450
|
-
name: string;
|
1451
|
-
value: string;
|
1452
|
-
}> | undefined;
|
1453
1458
|
}>;
|
1454
1459
|
id: string;
|
1455
1460
|
prevId: string;
|
@@ -1473,7 +1478,7 @@ type SQLiteSchema = TypeOf<typeof schema>;
|
|
1473
1478
|
type DrizzleSnapshotJSON = PgSchema;
|
1474
1479
|
type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
1475
1480
|
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
1476
|
-
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[]) => PgSchema;
|
1481
|
+
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
1477
1482
|
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
1478
1483
|
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
|
1479
1484
|
hasDataLoss: boolean;
|
@@ -1481,7 +1486,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
|
|
1481
1486
|
statementsToExecute: string[];
|
1482
1487
|
apply: () => Promise<void>;
|
1483
1488
|
}>;
|
1484
|
-
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchema>;
|
1489
|
+
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SQLiteSchema>;
|
1485
1490
|
declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
1486
1491
|
declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstance: LibSQLDatabase<any>) => Promise<{
|
1487
1492
|
hasDataLoss: boolean;
|
@@ -1489,7 +1494,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
|
|
1489
1494
|
statementsToExecute: string[];
|
1490
1495
|
apply: () => Promise<void>;
|
1491
1496
|
}>;
|
1492
|
-
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySqlSchema>;
|
1497
|
+
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<MySqlSchema>;
|
1493
1498
|
declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
1494
1499
|
declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstance: MySql2Database<any>, databaseName: string) => Promise<{
|
1495
1500
|
hasDataLoss: boolean;
|
@@ -1563,9 +1568,13 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1563
1568
|
columns: string[];
|
1564
1569
|
nullsNotDistinct: boolean;
|
1565
1570
|
}>;
|
1566
|
-
|
1567
|
-
value: string;
|
1571
|
+
policies: Record<string, {
|
1568
1572
|
name: string;
|
1573
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
1574
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
1575
|
+
to?: string[] | undefined;
|
1576
|
+
using?: string | undefined;
|
1577
|
+
withCheck?: string | undefined;
|
1569
1578
|
}>;
|
1570
1579
|
}>;
|
1571
1580
|
enums: Record<string, {
|
@@ -1584,6 +1593,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1584
1593
|
cache?: string | undefined;
|
1585
1594
|
cycle?: boolean | undefined;
|
1586
1595
|
}>;
|
1596
|
+
roles: Record<string, {
|
1597
|
+
name: string;
|
1598
|
+
createDb?: boolean | undefined;
|
1599
|
+
createRole?: boolean | undefined;
|
1600
|
+
inherit?: boolean | undefined;
|
1601
|
+
}>;
|
1587
1602
|
_meta: {
|
1588
1603
|
tables: Record<string, string>;
|
1589
1604
|
columns: Record<string, string>;
|
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,16 +120,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
119
120
|
name: string;
|
120
121
|
columns: string[];
|
121
122
|
}>>>;
|
122
|
-
checkConstraint: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
123
|
-
name: zod.ZodString;
|
124
|
-
value: zod.ZodString;
|
125
|
-
}, "strict", zod.ZodTypeAny, {
|
126
|
-
name: string;
|
127
|
-
value: string;
|
128
|
-
}, {
|
129
|
-
name: string;
|
130
|
-
value: string;
|
131
|
-
}>>>;
|
132
123
|
}, "strict", zod.ZodTypeAny, {
|
133
124
|
name: string;
|
134
125
|
columns: Record<string, {
|
@@ -169,10 +160,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
169
160
|
name: string;
|
170
161
|
columns: string[];
|
171
162
|
}>;
|
172
|
-
checkConstraint: Record<string, {
|
173
|
-
name: string;
|
174
|
-
value: string;
|
175
|
-
}>;
|
176
163
|
}, {
|
177
164
|
name: string;
|
178
165
|
columns: Record<string, {
|
@@ -213,10 +200,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
213
200
|
name: string;
|
214
201
|
columns: string[];
|
215
202
|
}> | undefined;
|
216
|
-
checkConstraint?: Record<string, {
|
217
|
-
name: string;
|
218
|
-
value: string;
|
219
|
-
}> | undefined;
|
220
203
|
}>>;
|
221
204
|
_meta: zod.ZodObject<{
|
222
205
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
@@ -330,10 +313,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
330
313
|
name: string;
|
331
314
|
columns: string[];
|
332
315
|
}>;
|
333
|
-
checkConstraint: Record<string, {
|
334
|
-
name: string;
|
335
|
-
value: string;
|
336
|
-
}>;
|
337
316
|
}>;
|
338
317
|
id: string;
|
339
318
|
prevId: string;
|
@@ -396,10 +375,6 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
396
375
|
name: string;
|
397
376
|
columns: string[];
|
398
377
|
}> | undefined;
|
399
|
-
checkConstraint?: Record<string, {
|
400
|
-
name: string;
|
401
|
-
value: string;
|
402
|
-
}> | undefined;
|
403
378
|
}>;
|
404
379
|
id: string;
|
405
380
|
prevId: string;
|
@@ -639,15 +614,27 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
639
614
|
columns: string[];
|
640
615
|
nullsNotDistinct: boolean;
|
641
616
|
}>>>;
|
642
|
-
|
617
|
+
policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
643
618
|
name: zod.ZodString;
|
644
|
-
|
619
|
+
as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
|
620
|
+
for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
|
621
|
+
to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
622
|
+
using: zod.ZodOptional<zod.ZodString>;
|
623
|
+
withCheck: zod.ZodOptional<zod.ZodString>;
|
645
624
|
}, "strict", zod.ZodTypeAny, {
|
646
625
|
name: string;
|
647
|
-
|
626
|
+
using?: string | undefined;
|
627
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
628
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
629
|
+
to?: string[] | undefined;
|
630
|
+
withCheck?: string | undefined;
|
648
631
|
}, {
|
649
632
|
name: string;
|
650
|
-
|
633
|
+
using?: string | undefined;
|
634
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
635
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
636
|
+
to?: string[] | undefined;
|
637
|
+
withCheck?: string | undefined;
|
651
638
|
}>>>;
|
652
639
|
}, "strict", zod.ZodTypeAny, {
|
653
640
|
name: string;
|
@@ -712,9 +699,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
712
699
|
columns: string[];
|
713
700
|
nullsNotDistinct: boolean;
|
714
701
|
}>;
|
715
|
-
|
702
|
+
policies: Record<string, {
|
716
703
|
name: string;
|
717
|
-
|
704
|
+
using?: string | undefined;
|
705
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
706
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
707
|
+
to?: string[] | undefined;
|
708
|
+
withCheck?: string | undefined;
|
718
709
|
}>;
|
719
710
|
}, {
|
720
711
|
name: string;
|
@@ -779,9 +770,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
779
770
|
columns: string[];
|
780
771
|
nullsNotDistinct: boolean;
|
781
772
|
}> | undefined;
|
782
|
-
|
773
|
+
policies?: Record<string, {
|
783
774
|
name: string;
|
784
|
-
|
775
|
+
using?: string | undefined;
|
776
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
777
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
778
|
+
to?: string[] | undefined;
|
779
|
+
withCheck?: string | undefined;
|
785
780
|
}> | undefined;
|
786
781
|
}>>;
|
787
782
|
enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
@@ -826,6 +821,22 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
826
821
|
cache?: string | undefined;
|
827
822
|
cycle?: boolean | undefined;
|
828
823
|
}>>>;
|
824
|
+
roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
825
|
+
name: zod.ZodString;
|
826
|
+
createDb: zod.ZodOptional<zod.ZodBoolean>;
|
827
|
+
createRole: zod.ZodOptional<zod.ZodBoolean>;
|
828
|
+
inherit: zod.ZodOptional<zod.ZodBoolean>;
|
829
|
+
}, "strict", zod.ZodTypeAny, {
|
830
|
+
name: string;
|
831
|
+
createDb?: boolean | undefined;
|
832
|
+
createRole?: boolean | undefined;
|
833
|
+
inherit?: boolean | undefined;
|
834
|
+
}, {
|
835
|
+
name: string;
|
836
|
+
createDb?: boolean | undefined;
|
837
|
+
createRole?: boolean | undefined;
|
838
|
+
inherit?: boolean | undefined;
|
839
|
+
}>>>;
|
829
840
|
_meta: zod.ZodObject<{
|
830
841
|
schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
831
842
|
tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
@@ -958,9 +969,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
958
969
|
columns: string[];
|
959
970
|
nullsNotDistinct: boolean;
|
960
971
|
}>;
|
961
|
-
|
972
|
+
policies: Record<string, {
|
962
973
|
name: string;
|
963
|
-
|
974
|
+
using?: string | undefined;
|
975
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
976
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
977
|
+
to?: string[] | undefined;
|
978
|
+
withCheck?: string | undefined;
|
964
979
|
}>;
|
965
980
|
}>;
|
966
981
|
id: string;
|
@@ -988,6 +1003,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
988
1003
|
cache?: string | undefined;
|
989
1004
|
cycle?: boolean | undefined;
|
990
1005
|
}>;
|
1006
|
+
roles: Record<string, {
|
1007
|
+
name: string;
|
1008
|
+
createDb?: boolean | undefined;
|
1009
|
+
createRole?: boolean | undefined;
|
1010
|
+
inherit?: boolean | undefined;
|
1011
|
+
}>;
|
991
1012
|
internal?: {
|
992
1013
|
tables: Record<string, {
|
993
1014
|
columns: Record<string, {
|
@@ -1062,9 +1083,13 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1062
1083
|
columns: string[];
|
1063
1084
|
nullsNotDistinct: boolean;
|
1064
1085
|
}> | undefined;
|
1065
|
-
|
1086
|
+
policies?: Record<string, {
|
1066
1087
|
name: string;
|
1067
|
-
|
1088
|
+
using?: string | undefined;
|
1089
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
1090
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
1091
|
+
to?: string[] | undefined;
|
1092
|
+
withCheck?: string | undefined;
|
1068
1093
|
}> | undefined;
|
1069
1094
|
}>;
|
1070
1095
|
id: string;
|
@@ -1102,6 +1127,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1102
1127
|
cache?: string | undefined;
|
1103
1128
|
cycle?: boolean | undefined;
|
1104
1129
|
}> | undefined;
|
1130
|
+
roles?: Record<string, {
|
1131
|
+
name: string;
|
1132
|
+
createDb?: boolean | undefined;
|
1133
|
+
createRole?: boolean | undefined;
|
1134
|
+
inherit?: boolean | undefined;
|
1135
|
+
}> | undefined;
|
1105
1136
|
}>;
|
1106
1137
|
type PgSchema = TypeOf<typeof pgSchema>;
|
1107
1138
|
|
@@ -1211,16 +1242,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1211
1242
|
name: string;
|
1212
1243
|
columns: string[];
|
1213
1244
|
}>>>;
|
1214
|
-
checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
|
1215
|
-
name: zod.ZodString;
|
1216
|
-
value: zod.ZodString;
|
1217
|
-
}, "strict", zod.ZodTypeAny, {
|
1218
|
-
name: string;
|
1219
|
-
value: string;
|
1220
|
-
}, {
|
1221
|
-
name: string;
|
1222
|
-
value: string;
|
1223
|
-
}>>>;
|
1224
1245
|
}, "strict", zod.ZodTypeAny, {
|
1225
1246
|
name: string;
|
1226
1247
|
columns: Record<string, {
|
@@ -1258,10 +1279,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1258
1279
|
name: string;
|
1259
1280
|
columns: string[];
|
1260
1281
|
}>;
|
1261
|
-
checkConstraints: Record<string, {
|
1262
|
-
name: string;
|
1263
|
-
value: string;
|
1264
|
-
}>;
|
1265
1282
|
}, {
|
1266
1283
|
name: string;
|
1267
1284
|
columns: Record<string, {
|
@@ -1299,10 +1316,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1299
1316
|
name: string;
|
1300
1317
|
columns: string[];
|
1301
1318
|
}> | undefined;
|
1302
|
-
checkConstraints?: Record<string, {
|
1303
|
-
name: string;
|
1304
|
-
value: string;
|
1305
|
-
}> | undefined;
|
1306
1319
|
}>>;
|
1307
1320
|
enums: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
|
1308
1321
|
_meta: zod.ZodObject<{
|
@@ -1387,10 +1400,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1387
1400
|
name: string;
|
1388
1401
|
columns: string[];
|
1389
1402
|
}>;
|
1390
|
-
checkConstraints: Record<string, {
|
1391
|
-
name: string;
|
1392
|
-
value: string;
|
1393
|
-
}>;
|
1394
1403
|
}>;
|
1395
1404
|
id: string;
|
1396
1405
|
prevId: string;
|
@@ -1446,10 +1455,6 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
|
|
1446
1455
|
name: string;
|
1447
1456
|
columns: string[];
|
1448
1457
|
}> | undefined;
|
1449
|
-
checkConstraints?: Record<string, {
|
1450
|
-
name: string;
|
1451
|
-
value: string;
|
1452
|
-
}> | undefined;
|
1453
1458
|
}>;
|
1454
1459
|
id: string;
|
1455
1460
|
prevId: string;
|
@@ -1473,7 +1478,7 @@ type SQLiteSchema = TypeOf<typeof schema>;
|
|
1473
1478
|
type DrizzleSnapshotJSON = PgSchema;
|
1474
1479
|
type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
|
1475
1480
|
type DrizzleMySQLSnapshotJSON = MySqlSchema;
|
1476
|
-
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[]) => PgSchema;
|
1481
|
+
declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
|
1477
1482
|
declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
|
1478
1483
|
declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
|
1479
1484
|
hasDataLoss: boolean;
|
@@ -1481,7 +1486,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
|
|
1481
1486
|
statementsToExecute: string[];
|
1482
1487
|
apply: () => Promise<void>;
|
1483
1488
|
}>;
|
1484
|
-
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchema>;
|
1489
|
+
declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SQLiteSchema>;
|
1485
1490
|
declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
|
1486
1491
|
declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstance: LibSQLDatabase<any>) => Promise<{
|
1487
1492
|
hasDataLoss: boolean;
|
@@ -1489,7 +1494,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
|
|
1489
1494
|
statementsToExecute: string[];
|
1490
1495
|
apply: () => Promise<void>;
|
1491
1496
|
}>;
|
1492
|
-
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySqlSchema>;
|
1497
|
+
declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<MySqlSchema>;
|
1493
1498
|
declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
|
1494
1499
|
declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstance: MySql2Database<any>, databaseName: string) => Promise<{
|
1495
1500
|
hasDataLoss: boolean;
|
@@ -1563,9 +1568,13 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1563
1568
|
columns: string[];
|
1564
1569
|
nullsNotDistinct: boolean;
|
1565
1570
|
}>;
|
1566
|
-
|
1567
|
-
value: string;
|
1571
|
+
policies: Record<string, {
|
1568
1572
|
name: string;
|
1573
|
+
as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
|
1574
|
+
for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
|
1575
|
+
to?: string[] | undefined;
|
1576
|
+
using?: string | undefined;
|
1577
|
+
withCheck?: string | undefined;
|
1569
1578
|
}>;
|
1570
1579
|
}>;
|
1571
1580
|
enums: Record<string, {
|
@@ -1584,6 +1593,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
|
|
1584
1593
|
cache?: string | undefined;
|
1585
1594
|
cycle?: boolean | undefined;
|
1586
1595
|
}>;
|
1596
|
+
roles: Record<string, {
|
1597
|
+
name: string;
|
1598
|
+
createDb?: boolean | undefined;
|
1599
|
+
createRole?: boolean | undefined;
|
1600
|
+
inherit?: boolean | undefined;
|
1601
|
+
}>;
|
1587
1602
|
_meta: {
|
1588
1603
|
tables: Record<string, string>;
|
1589
1604
|
columns: Record<string, string>;
|