drizzle-kit 0.26.2 → 0.27.0

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.
Files changed (10) hide show
  1. package/api.d.mts +170 -8
  2. package/api.d.ts +170 -8
  3. package/api.js +2453 -1178
  4. package/api.mjs +2453 -1178
  5. package/bin.cjs +1749 -410
  6. package/index.d.mts +7 -0
  7. package/index.d.ts +7 -0
  8. package/package.json +6 -6
  9. package/utils.js +32 -11
  10. package/utils.mjs +32 -10
package/api.d.mts CHANGED
@@ -774,6 +774,31 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
774
774
  columns: string[];
775
775
  nullsNotDistinct: boolean;
776
776
  }>>>;
777
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
778
+ name: zod.ZodString;
779
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
780
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
781
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
782
+ using: zod.ZodOptional<zod.ZodString>;
783
+ withCheck: zod.ZodOptional<zod.ZodString>;
784
+ on: zod.ZodOptional<zod.ZodString>;
785
+ }, "strict", zod.ZodTypeAny, {
786
+ name: string;
787
+ using?: string | undefined;
788
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
789
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
790
+ to?: string[] | undefined;
791
+ withCheck?: string | undefined;
792
+ on?: string | undefined;
793
+ }, {
794
+ name: string;
795
+ using?: string | undefined;
796
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
797
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
798
+ to?: string[] | undefined;
799
+ withCheck?: string | undefined;
800
+ on?: string | undefined;
801
+ }>>>;
777
802
  checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
778
803
  name: zod.ZodString;
779
804
  value: zod.ZodString;
@@ -784,6 +809,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
784
809
  name: string;
785
810
  value: string;
786
811
  }>>>;
812
+ isRLSEnabled: zod.ZodDefault<zod.ZodBoolean>;
787
813
  }, "strict", zod.ZodTypeAny, {
788
814
  name: string;
789
815
  columns: Record<string, {
@@ -851,6 +877,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
851
877
  name: string;
852
878
  value: string;
853
879
  }>;
880
+ policies: Record<string, {
881
+ name: string;
882
+ using?: string | undefined;
883
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
884
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
885
+ to?: string[] | undefined;
886
+ withCheck?: string | undefined;
887
+ on?: string | undefined;
888
+ }>;
889
+ isRLSEnabled: boolean;
854
890
  }, {
855
891
  name: string;
856
892
  columns: Record<string, {
@@ -918,6 +954,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
918
954
  name: string;
919
955
  value: string;
920
956
  }> | undefined;
957
+ policies?: Record<string, {
958
+ name: string;
959
+ using?: string | undefined;
960
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
961
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
962
+ to?: string[] | undefined;
963
+ withCheck?: string | undefined;
964
+ on?: string | undefined;
965
+ }> | undefined;
966
+ isRLSEnabled?: boolean | undefined;
921
967
  }>>;
922
968
  enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
923
969
  name: zod.ZodString;
@@ -1072,7 +1118,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1072
1118
  toastTupleTarget?: number | undefined;
1073
1119
  parallelWorkers?: number | undefined;
1074
1120
  autovacuumEnabled?: boolean | undefined;
1075
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1121
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1076
1122
  vacuumTruncate?: boolean | undefined;
1077
1123
  autovacuumVacuumThreshold?: number | undefined;
1078
1124
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1094,7 +1140,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1094
1140
  toastTupleTarget?: number | undefined;
1095
1141
  parallelWorkers?: number | undefined;
1096
1142
  autovacuumEnabled?: boolean | undefined;
1097
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1143
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1098
1144
  vacuumTruncate?: boolean | undefined;
1099
1145
  autovacuumVacuumThreshold?: number | undefined;
1100
1146
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1154,7 +1200,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1154
1200
  toastTupleTarget?: number | undefined;
1155
1201
  parallelWorkers?: number | undefined;
1156
1202
  autovacuumEnabled?: boolean | undefined;
1157
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1203
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1158
1204
  vacuumTruncate?: boolean | undefined;
1159
1205
  autovacuumVacuumThreshold?: number | undefined;
1160
1206
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1212,7 +1258,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1212
1258
  toastTupleTarget?: number | undefined;
1213
1259
  parallelWorkers?: number | undefined;
1214
1260
  autovacuumEnabled?: boolean | undefined;
1215
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1261
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1216
1262
  vacuumTruncate?: boolean | undefined;
1217
1263
  autovacuumVacuumThreshold?: number | undefined;
1218
1264
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1258,6 +1304,47 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1258
1304
  cache?: string | undefined;
1259
1305
  cycle?: boolean | undefined;
1260
1306
  }>>>;
1307
+ roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1308
+ name: zod.ZodString;
1309
+ createDb: zod.ZodOptional<zod.ZodBoolean>;
1310
+ createRole: zod.ZodOptional<zod.ZodBoolean>;
1311
+ inherit: zod.ZodOptional<zod.ZodBoolean>;
1312
+ }, "strict", zod.ZodTypeAny, {
1313
+ name: string;
1314
+ createDb?: boolean | undefined;
1315
+ createRole?: boolean | undefined;
1316
+ inherit?: boolean | undefined;
1317
+ }, {
1318
+ name: string;
1319
+ createDb?: boolean | undefined;
1320
+ createRole?: boolean | undefined;
1321
+ inherit?: boolean | undefined;
1322
+ }>>>;
1323
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1324
+ name: zod.ZodString;
1325
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
1326
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
1327
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1328
+ using: zod.ZodOptional<zod.ZodString>;
1329
+ withCheck: zod.ZodOptional<zod.ZodString>;
1330
+ on: zod.ZodOptional<zod.ZodString>;
1331
+ }, "strict", zod.ZodTypeAny, {
1332
+ name: string;
1333
+ using?: string | undefined;
1334
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1335
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1336
+ to?: string[] | undefined;
1337
+ withCheck?: string | undefined;
1338
+ on?: string | undefined;
1339
+ }, {
1340
+ name: string;
1341
+ using?: string | undefined;
1342
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1343
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1344
+ to?: string[] | undefined;
1345
+ withCheck?: string | undefined;
1346
+ on?: string | undefined;
1347
+ }>>>;
1261
1348
  _meta: zod.ZodObject<{
1262
1349
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
1263
1350
  tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
@@ -1394,6 +1481,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1394
1481
  name: string;
1395
1482
  value: string;
1396
1483
  }>;
1484
+ policies: Record<string, {
1485
+ name: string;
1486
+ using?: string | undefined;
1487
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1488
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1489
+ to?: string[] | undefined;
1490
+ withCheck?: string | undefined;
1491
+ on?: string | undefined;
1492
+ }>;
1493
+ isRLSEnabled: boolean;
1397
1494
  }>;
1398
1495
  id: string;
1399
1496
  prevId: string;
@@ -1446,7 +1543,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1446
1543
  toastTupleTarget?: number | undefined;
1447
1544
  parallelWorkers?: number | undefined;
1448
1545
  autovacuumEnabled?: boolean | undefined;
1449
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1546
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1450
1547
  vacuumTruncate?: boolean | undefined;
1451
1548
  autovacuumVacuumThreshold?: number | undefined;
1452
1549
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1469,6 +1566,15 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1469
1566
  values: string[];
1470
1567
  schema: string;
1471
1568
  }>;
1569
+ policies: Record<string, {
1570
+ name: string;
1571
+ using?: string | undefined;
1572
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1573
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1574
+ to?: string[] | undefined;
1575
+ withCheck?: string | undefined;
1576
+ on?: string | undefined;
1577
+ }>;
1472
1578
  sequences: Record<string, {
1473
1579
  name: string;
1474
1580
  schema: string;
@@ -1479,6 +1585,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1479
1585
  cache?: string | undefined;
1480
1586
  cycle?: boolean | undefined;
1481
1587
  }>;
1588
+ roles: Record<string, {
1589
+ name: string;
1590
+ createDb?: boolean | undefined;
1591
+ createRole?: boolean | undefined;
1592
+ inherit?: boolean | undefined;
1593
+ }>;
1482
1594
  internal?: {
1483
1595
  tables: Record<string, {
1484
1596
  columns: Record<string, {
@@ -1557,6 +1669,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1557
1669
  name: string;
1558
1670
  value: string;
1559
1671
  }> | undefined;
1672
+ policies?: Record<string, {
1673
+ name: string;
1674
+ using?: string | undefined;
1675
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1676
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1677
+ to?: string[] | undefined;
1678
+ withCheck?: string | undefined;
1679
+ on?: string | undefined;
1680
+ }> | undefined;
1681
+ isRLSEnabled?: boolean | undefined;
1560
1682
  }>;
1561
1683
  id: string;
1562
1684
  prevId: string;
@@ -1624,7 +1746,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1624
1746
  toastTupleTarget?: number | undefined;
1625
1747
  parallelWorkers?: number | undefined;
1626
1748
  autovacuumEnabled?: boolean | undefined;
1627
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1749
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1628
1750
  vacuumTruncate?: boolean | undefined;
1629
1751
  autovacuumVacuumThreshold?: number | undefined;
1630
1752
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1642,6 +1764,15 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1642
1764
  withNoData?: boolean | undefined;
1643
1765
  tablespace?: string | undefined;
1644
1766
  }> | undefined;
1767
+ policies?: Record<string, {
1768
+ name: string;
1769
+ using?: string | undefined;
1770
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1771
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1772
+ to?: string[] | undefined;
1773
+ withCheck?: string | undefined;
1774
+ on?: string | undefined;
1775
+ }> | undefined;
1645
1776
  sequences?: Record<string, {
1646
1777
  name: string;
1647
1778
  schema: string;
@@ -1652,6 +1783,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1652
1783
  cache?: string | undefined;
1653
1784
  cycle?: boolean | undefined;
1654
1785
  }> | undefined;
1786
+ roles?: Record<string, {
1787
+ name: string;
1788
+ createDb?: boolean | undefined;
1789
+ createRole?: boolean | undefined;
1790
+ inherit?: boolean | undefined;
1791
+ }> | undefined;
1655
1792
  }>;
1656
1793
  type PgSchema = TypeOf<typeof pgSchema>;
1657
1794
 
@@ -2224,10 +2361,29 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2224
2361
  columns: string[];
2225
2362
  nullsNotDistinct: boolean;
2226
2363
  }>;
2364
+ policies: Record<string, {
2365
+ name: string;
2366
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
2367
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
2368
+ to?: string[] | undefined;
2369
+ using?: string | undefined;
2370
+ withCheck?: string | undefined;
2371
+ on?: string | undefined;
2372
+ }>;
2227
2373
  checkConstraints: Record<string, {
2228
2374
  value: string;
2229
2375
  name: string;
2230
2376
  }>;
2377
+ isRLSEnabled: boolean;
2378
+ }>;
2379
+ policies: Record<string, {
2380
+ name: string;
2381
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
2382
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
2383
+ to?: string[] | undefined;
2384
+ using?: string | undefined;
2385
+ withCheck?: string | undefined;
2386
+ on?: string | undefined;
2231
2387
  }>;
2232
2388
  enums: Record<string, {
2233
2389
  values: string[];
@@ -2274,7 +2430,7 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2274
2430
  toastTupleTarget?: number | undefined;
2275
2431
  parallelWorkers?: number | undefined;
2276
2432
  autovacuumEnabled?: boolean | undefined;
2277
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
2433
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
2278
2434
  vacuumTruncate?: boolean | undefined;
2279
2435
  autovacuumVacuumThreshold?: number | undefined;
2280
2436
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -2289,9 +2445,9 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2289
2445
  logAutovacuumMinDuration?: number | undefined;
2290
2446
  userCatalogTable?: boolean | undefined;
2291
2447
  } | undefined;
2448
+ using?: string | undefined;
2292
2449
  definition?: string | undefined;
2293
2450
  withNoData?: boolean | undefined;
2294
- using?: string | undefined;
2295
2451
  tablespace?: string | undefined;
2296
2452
  }>;
2297
2453
  sequences: Record<string, {
@@ -2304,6 +2460,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2304
2460
  cache?: string | undefined;
2305
2461
  cycle?: boolean | undefined;
2306
2462
  }>;
2463
+ roles: Record<string, {
2464
+ name: string;
2465
+ createDb?: boolean | undefined;
2466
+ createRole?: boolean | undefined;
2467
+ inherit?: boolean | undefined;
2468
+ }>;
2307
2469
  _meta: {
2308
2470
  tables: Record<string, string>;
2309
2471
  columns: Record<string, string>;
package/api.d.ts CHANGED
@@ -774,6 +774,31 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
774
774
  columns: string[];
775
775
  nullsNotDistinct: boolean;
776
776
  }>>>;
777
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
778
+ name: zod.ZodString;
779
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
780
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
781
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
782
+ using: zod.ZodOptional<zod.ZodString>;
783
+ withCheck: zod.ZodOptional<zod.ZodString>;
784
+ on: zod.ZodOptional<zod.ZodString>;
785
+ }, "strict", zod.ZodTypeAny, {
786
+ name: string;
787
+ using?: string | undefined;
788
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
789
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
790
+ to?: string[] | undefined;
791
+ withCheck?: string | undefined;
792
+ on?: string | undefined;
793
+ }, {
794
+ name: string;
795
+ using?: string | undefined;
796
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
797
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
798
+ to?: string[] | undefined;
799
+ withCheck?: string | undefined;
800
+ on?: string | undefined;
801
+ }>>>;
777
802
  checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
778
803
  name: zod.ZodString;
779
804
  value: zod.ZodString;
@@ -784,6 +809,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
784
809
  name: string;
785
810
  value: string;
786
811
  }>>>;
812
+ isRLSEnabled: zod.ZodDefault<zod.ZodBoolean>;
787
813
  }, "strict", zod.ZodTypeAny, {
788
814
  name: string;
789
815
  columns: Record<string, {
@@ -851,6 +877,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
851
877
  name: string;
852
878
  value: string;
853
879
  }>;
880
+ policies: Record<string, {
881
+ name: string;
882
+ using?: string | undefined;
883
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
884
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
885
+ to?: string[] | undefined;
886
+ withCheck?: string | undefined;
887
+ on?: string | undefined;
888
+ }>;
889
+ isRLSEnabled: boolean;
854
890
  }, {
855
891
  name: string;
856
892
  columns: Record<string, {
@@ -918,6 +954,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
918
954
  name: string;
919
955
  value: string;
920
956
  }> | undefined;
957
+ policies?: Record<string, {
958
+ name: string;
959
+ using?: string | undefined;
960
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
961
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
962
+ to?: string[] | undefined;
963
+ withCheck?: string | undefined;
964
+ on?: string | undefined;
965
+ }> | undefined;
966
+ isRLSEnabled?: boolean | undefined;
921
967
  }>>;
922
968
  enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
923
969
  name: zod.ZodString;
@@ -1072,7 +1118,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1072
1118
  toastTupleTarget?: number | undefined;
1073
1119
  parallelWorkers?: number | undefined;
1074
1120
  autovacuumEnabled?: boolean | undefined;
1075
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1121
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1076
1122
  vacuumTruncate?: boolean | undefined;
1077
1123
  autovacuumVacuumThreshold?: number | undefined;
1078
1124
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1094,7 +1140,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1094
1140
  toastTupleTarget?: number | undefined;
1095
1141
  parallelWorkers?: number | undefined;
1096
1142
  autovacuumEnabled?: boolean | undefined;
1097
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1143
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1098
1144
  vacuumTruncate?: boolean | undefined;
1099
1145
  autovacuumVacuumThreshold?: number | undefined;
1100
1146
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1154,7 +1200,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1154
1200
  toastTupleTarget?: number | undefined;
1155
1201
  parallelWorkers?: number | undefined;
1156
1202
  autovacuumEnabled?: boolean | undefined;
1157
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1203
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1158
1204
  vacuumTruncate?: boolean | undefined;
1159
1205
  autovacuumVacuumThreshold?: number | undefined;
1160
1206
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1212,7 +1258,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1212
1258
  toastTupleTarget?: number | undefined;
1213
1259
  parallelWorkers?: number | undefined;
1214
1260
  autovacuumEnabled?: boolean | undefined;
1215
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1261
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1216
1262
  vacuumTruncate?: boolean | undefined;
1217
1263
  autovacuumVacuumThreshold?: number | undefined;
1218
1264
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1258,6 +1304,47 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1258
1304
  cache?: string | undefined;
1259
1305
  cycle?: boolean | undefined;
1260
1306
  }>>>;
1307
+ roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1308
+ name: zod.ZodString;
1309
+ createDb: zod.ZodOptional<zod.ZodBoolean>;
1310
+ createRole: zod.ZodOptional<zod.ZodBoolean>;
1311
+ inherit: zod.ZodOptional<zod.ZodBoolean>;
1312
+ }, "strict", zod.ZodTypeAny, {
1313
+ name: string;
1314
+ createDb?: boolean | undefined;
1315
+ createRole?: boolean | undefined;
1316
+ inherit?: boolean | undefined;
1317
+ }, {
1318
+ name: string;
1319
+ createDb?: boolean | undefined;
1320
+ createRole?: boolean | undefined;
1321
+ inherit?: boolean | undefined;
1322
+ }>>>;
1323
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1324
+ name: zod.ZodString;
1325
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
1326
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
1327
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1328
+ using: zod.ZodOptional<zod.ZodString>;
1329
+ withCheck: zod.ZodOptional<zod.ZodString>;
1330
+ on: zod.ZodOptional<zod.ZodString>;
1331
+ }, "strict", zod.ZodTypeAny, {
1332
+ name: string;
1333
+ using?: string | undefined;
1334
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1335
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1336
+ to?: string[] | undefined;
1337
+ withCheck?: string | undefined;
1338
+ on?: string | undefined;
1339
+ }, {
1340
+ name: string;
1341
+ using?: string | undefined;
1342
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1343
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1344
+ to?: string[] | undefined;
1345
+ withCheck?: string | undefined;
1346
+ on?: string | undefined;
1347
+ }>>>;
1261
1348
  _meta: zod.ZodObject<{
1262
1349
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
1263
1350
  tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
@@ -1394,6 +1481,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1394
1481
  name: string;
1395
1482
  value: string;
1396
1483
  }>;
1484
+ policies: Record<string, {
1485
+ name: string;
1486
+ using?: string | undefined;
1487
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1488
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1489
+ to?: string[] | undefined;
1490
+ withCheck?: string | undefined;
1491
+ on?: string | undefined;
1492
+ }>;
1493
+ isRLSEnabled: boolean;
1397
1494
  }>;
1398
1495
  id: string;
1399
1496
  prevId: string;
@@ -1446,7 +1543,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1446
1543
  toastTupleTarget?: number | undefined;
1447
1544
  parallelWorkers?: number | undefined;
1448
1545
  autovacuumEnabled?: boolean | undefined;
1449
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1546
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1450
1547
  vacuumTruncate?: boolean | undefined;
1451
1548
  autovacuumVacuumThreshold?: number | undefined;
1452
1549
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1469,6 +1566,15 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1469
1566
  values: string[];
1470
1567
  schema: string;
1471
1568
  }>;
1569
+ policies: Record<string, {
1570
+ name: string;
1571
+ using?: string | undefined;
1572
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1573
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1574
+ to?: string[] | undefined;
1575
+ withCheck?: string | undefined;
1576
+ on?: string | undefined;
1577
+ }>;
1472
1578
  sequences: Record<string, {
1473
1579
  name: string;
1474
1580
  schema: string;
@@ -1479,6 +1585,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1479
1585
  cache?: string | undefined;
1480
1586
  cycle?: boolean | undefined;
1481
1587
  }>;
1588
+ roles: Record<string, {
1589
+ name: string;
1590
+ createDb?: boolean | undefined;
1591
+ createRole?: boolean | undefined;
1592
+ inherit?: boolean | undefined;
1593
+ }>;
1482
1594
  internal?: {
1483
1595
  tables: Record<string, {
1484
1596
  columns: Record<string, {
@@ -1557,6 +1669,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1557
1669
  name: string;
1558
1670
  value: string;
1559
1671
  }> | undefined;
1672
+ policies?: Record<string, {
1673
+ name: string;
1674
+ using?: string | undefined;
1675
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1676
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1677
+ to?: string[] | undefined;
1678
+ withCheck?: string | undefined;
1679
+ on?: string | undefined;
1680
+ }> | undefined;
1681
+ isRLSEnabled?: boolean | undefined;
1560
1682
  }>;
1561
1683
  id: string;
1562
1684
  prevId: string;
@@ -1624,7 +1746,7 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1624
1746
  toastTupleTarget?: number | undefined;
1625
1747
  parallelWorkers?: number | undefined;
1626
1748
  autovacuumEnabled?: boolean | undefined;
1627
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1749
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
1628
1750
  vacuumTruncate?: boolean | undefined;
1629
1751
  autovacuumVacuumThreshold?: number | undefined;
1630
1752
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -1642,6 +1764,15 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1642
1764
  withNoData?: boolean | undefined;
1643
1765
  tablespace?: string | undefined;
1644
1766
  }> | undefined;
1767
+ policies?: Record<string, {
1768
+ name: string;
1769
+ using?: string | undefined;
1770
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1771
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1772
+ to?: string[] | undefined;
1773
+ withCheck?: string | undefined;
1774
+ on?: string | undefined;
1775
+ }> | undefined;
1645
1776
  sequences?: Record<string, {
1646
1777
  name: string;
1647
1778
  schema: string;
@@ -1652,6 +1783,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1652
1783
  cache?: string | undefined;
1653
1784
  cycle?: boolean | undefined;
1654
1785
  }> | undefined;
1786
+ roles?: Record<string, {
1787
+ name: string;
1788
+ createDb?: boolean | undefined;
1789
+ createRole?: boolean | undefined;
1790
+ inherit?: boolean | undefined;
1791
+ }> | undefined;
1655
1792
  }>;
1656
1793
  type PgSchema = TypeOf<typeof pgSchema>;
1657
1794
 
@@ -2224,10 +2361,29 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2224
2361
  columns: string[];
2225
2362
  nullsNotDistinct: boolean;
2226
2363
  }>;
2364
+ policies: Record<string, {
2365
+ name: string;
2366
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
2367
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
2368
+ to?: string[] | undefined;
2369
+ using?: string | undefined;
2370
+ withCheck?: string | undefined;
2371
+ on?: string | undefined;
2372
+ }>;
2227
2373
  checkConstraints: Record<string, {
2228
2374
  value: string;
2229
2375
  name: string;
2230
2376
  }>;
2377
+ isRLSEnabled: boolean;
2378
+ }>;
2379
+ policies: Record<string, {
2380
+ name: string;
2381
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
2382
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
2383
+ to?: string[] | undefined;
2384
+ using?: string | undefined;
2385
+ withCheck?: string | undefined;
2386
+ on?: string | undefined;
2231
2387
  }>;
2232
2388
  enums: Record<string, {
2233
2389
  values: string[];
@@ -2274,7 +2430,7 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2274
2430
  toastTupleTarget?: number | undefined;
2275
2431
  parallelWorkers?: number | undefined;
2276
2432
  autovacuumEnabled?: boolean | undefined;
2277
- vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
2433
+ vacuumIndexCleanup?: "on" | "auto" | "off" | undefined;
2278
2434
  vacuumTruncate?: boolean | undefined;
2279
2435
  autovacuumVacuumThreshold?: number | undefined;
2280
2436
  autovacuumVacuumScaleFactor?: number | undefined;
@@ -2289,9 +2445,9 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2289
2445
  logAutovacuumMinDuration?: number | undefined;
2290
2446
  userCatalogTable?: boolean | undefined;
2291
2447
  } | undefined;
2448
+ using?: string | undefined;
2292
2449
  definition?: string | undefined;
2293
2450
  withNoData?: boolean | undefined;
2294
- using?: string | undefined;
2295
2451
  tablespace?: string | undefined;
2296
2452
  }>;
2297
2453
  sequences: Record<string, {
@@ -2304,6 +2460,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
2304
2460
  cache?: string | undefined;
2305
2461
  cycle?: boolean | undefined;
2306
2462
  }>;
2463
+ roles: Record<string, {
2464
+ name: string;
2465
+ createDb?: boolean | undefined;
2466
+ createRole?: boolean | undefined;
2467
+ inherit?: boolean | undefined;
2468
+ }>;
2307
2469
  _meta: {
2308
2470
  tables: Record<string, string>;
2309
2471
  columns: Record<string, string>;