drizzle-kit 0.24.2-cf2bc48 → 0.24.2-d496e6f

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 +102 -6
  2. package/api.d.ts +102 -6
  3. package/api.js +90036 -14643
  4. package/api.mjs +90033 -14643
  5. package/bin.cjs +64827 -62632
  6. package/index.d.mts +13 -4
  7. package/index.d.ts +13 -4
  8. package/package.json +4 -4
  9. package/utils.js +65 -20
  10. package/utils.mjs +63 -20
package/api.d.mts CHANGED
@@ -65,14 +65,14 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
65
65
  isUnique: boolean;
66
66
  using?: "btree" | "hash" | undefined;
67
67
  algorithm?: "default" | "inplace" | "copy" | undefined;
68
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
68
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
69
69
  }, {
70
70
  name: string;
71
71
  columns: string[];
72
72
  isUnique: boolean;
73
73
  using?: "btree" | "hash" | undefined;
74
74
  algorithm?: "default" | "inplace" | "copy" | undefined;
75
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
75
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
76
76
  }>>;
77
77
  foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
78
78
  name: zod.ZodString;
@@ -140,7 +140,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
140
140
  isUnique: boolean;
141
141
  using?: "btree" | "hash" | undefined;
142
142
  algorithm?: "default" | "inplace" | "copy" | undefined;
143
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
143
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
144
144
  }>;
145
145
  foreignKeys: Record<string, {
146
146
  name: string;
@@ -180,7 +180,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
180
180
  isUnique: boolean;
181
181
  using?: "btree" | "hash" | undefined;
182
182
  algorithm?: "default" | "inplace" | "copy" | undefined;
183
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
183
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
184
184
  }>;
185
185
  foreignKeys: Record<string, {
186
186
  name: string;
@@ -293,7 +293,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
293
293
  isUnique: boolean;
294
294
  using?: "btree" | "hash" | undefined;
295
295
  algorithm?: "default" | "inplace" | "copy" | undefined;
296
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
296
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
297
297
  }>;
298
298
  foreignKeys: Record<string, {
299
299
  name: string;
@@ -355,7 +355,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
355
355
  isUnique: boolean;
356
356
  using?: "btree" | "hash" | undefined;
357
357
  algorithm?: "default" | "inplace" | "copy" | undefined;
358
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
358
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
359
359
  }>;
360
360
  foreignKeys: Record<string, {
361
361
  name: string;
@@ -613,6 +613,28 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
613
613
  columns: string[];
614
614
  nullsNotDistinct: boolean;
615
615
  }>>>;
616
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
617
+ name: zod.ZodString;
618
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
619
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
620
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
621
+ using: zod.ZodOptional<zod.ZodString>;
622
+ withCheck: zod.ZodOptional<zod.ZodString>;
623
+ }, "strict", zod.ZodTypeAny, {
624
+ name: string;
625
+ using?: string | undefined;
626
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
627
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
628
+ to?: string[] | undefined;
629
+ withCheck?: string | undefined;
630
+ }, {
631
+ name: string;
632
+ using?: string | undefined;
633
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
634
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
635
+ to?: string[] | undefined;
636
+ withCheck?: string | undefined;
637
+ }>>>;
616
638
  }, "strict", zod.ZodTypeAny, {
617
639
  name: string;
618
640
  columns: Record<string, {
@@ -676,6 +698,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
676
698
  columns: string[];
677
699
  nullsNotDistinct: boolean;
678
700
  }>;
701
+ policies: Record<string, {
702
+ name: string;
703
+ using?: string | undefined;
704
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
705
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
706
+ to?: string[] | undefined;
707
+ withCheck?: string | undefined;
708
+ }>;
679
709
  }, {
680
710
  name: string;
681
711
  columns: Record<string, {
@@ -739,6 +769,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
739
769
  columns: string[];
740
770
  nullsNotDistinct: boolean;
741
771
  }> | undefined;
772
+ policies?: Record<string, {
773
+ name: string;
774
+ using?: string | undefined;
775
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
776
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
777
+ to?: string[] | undefined;
778
+ withCheck?: string | undefined;
779
+ }> | undefined;
742
780
  }>>;
743
781
  enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
744
782
  name: zod.ZodString;
@@ -782,6 +820,22 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
782
820
  cache?: string | undefined;
783
821
  cycle?: boolean | undefined;
784
822
  }>>>;
823
+ roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
824
+ name: zod.ZodString;
825
+ createDb: zod.ZodOptional<zod.ZodBoolean>;
826
+ createRole: zod.ZodOptional<zod.ZodBoolean>;
827
+ inherit: zod.ZodOptional<zod.ZodBoolean>;
828
+ }, "strict", zod.ZodTypeAny, {
829
+ name: string;
830
+ createDb?: boolean | undefined;
831
+ createRole?: boolean | undefined;
832
+ inherit?: boolean | undefined;
833
+ }, {
834
+ name: string;
835
+ createDb?: boolean | undefined;
836
+ createRole?: boolean | undefined;
837
+ inherit?: boolean | undefined;
838
+ }>>>;
785
839
  _meta: zod.ZodObject<{
786
840
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
787
841
  tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
@@ -914,6 +968,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
914
968
  columns: string[];
915
969
  nullsNotDistinct: boolean;
916
970
  }>;
971
+ policies: Record<string, {
972
+ name: string;
973
+ using?: string | undefined;
974
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
975
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
976
+ to?: string[] | undefined;
977
+ withCheck?: string | undefined;
978
+ }>;
917
979
  }>;
918
980
  id: string;
919
981
  prevId: string;
@@ -940,6 +1002,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
940
1002
  cache?: string | undefined;
941
1003
  cycle?: boolean | undefined;
942
1004
  }>;
1005
+ roles: Record<string, {
1006
+ name: string;
1007
+ createDb?: boolean | undefined;
1008
+ createRole?: boolean | undefined;
1009
+ inherit?: boolean | undefined;
1010
+ }>;
943
1011
  internal?: {
944
1012
  tables: Record<string, {
945
1013
  columns: Record<string, {
@@ -1014,6 +1082,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1014
1082
  columns: string[];
1015
1083
  nullsNotDistinct: boolean;
1016
1084
  }> | undefined;
1085
+ policies?: Record<string, {
1086
+ name: string;
1087
+ using?: string | undefined;
1088
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1089
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1090
+ to?: string[] | undefined;
1091
+ withCheck?: string | undefined;
1092
+ }> | undefined;
1017
1093
  }>;
1018
1094
  id: string;
1019
1095
  prevId: string;
@@ -1050,6 +1126,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1050
1126
  cache?: string | undefined;
1051
1127
  cycle?: boolean | undefined;
1052
1128
  }> | undefined;
1129
+ roles?: Record<string, {
1130
+ name: string;
1131
+ createDb?: boolean | undefined;
1132
+ createRole?: boolean | undefined;
1133
+ inherit?: boolean | undefined;
1134
+ }> | undefined;
1053
1135
  }>;
1054
1136
  type PgSchema = TypeOf<typeof pgSchema>;
1055
1137
 
@@ -1485,6 +1567,14 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1485
1567
  columns: string[];
1486
1568
  nullsNotDistinct: boolean;
1487
1569
  }>;
1570
+ policies: Record<string, {
1571
+ name: string;
1572
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1573
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1574
+ to?: string[] | undefined;
1575
+ using?: string | undefined;
1576
+ withCheck?: string | undefined;
1577
+ }>;
1488
1578
  }>;
1489
1579
  enums: Record<string, {
1490
1580
  values: string[];
@@ -1502,6 +1592,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1502
1592
  cache?: string | undefined;
1503
1593
  cycle?: boolean | undefined;
1504
1594
  }>;
1595
+ roles: Record<string, {
1596
+ name: string;
1597
+ createDb?: boolean | undefined;
1598
+ createRole?: boolean | undefined;
1599
+ inherit?: boolean | undefined;
1600
+ }>;
1505
1601
  _meta: {
1506
1602
  tables: Record<string, string>;
1507
1603
  columns: Record<string, string>;
package/api.d.ts CHANGED
@@ -65,14 +65,14 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
65
65
  isUnique: boolean;
66
66
  using?: "btree" | "hash" | undefined;
67
67
  algorithm?: "default" | "inplace" | "copy" | undefined;
68
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
68
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
69
69
  }, {
70
70
  name: string;
71
71
  columns: string[];
72
72
  isUnique: boolean;
73
73
  using?: "btree" | "hash" | undefined;
74
74
  algorithm?: "default" | "inplace" | "copy" | undefined;
75
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
75
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
76
76
  }>>;
77
77
  foreignKeys: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
78
78
  name: zod.ZodString;
@@ -140,7 +140,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
140
140
  isUnique: boolean;
141
141
  using?: "btree" | "hash" | undefined;
142
142
  algorithm?: "default" | "inplace" | "copy" | undefined;
143
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
143
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
144
144
  }>;
145
145
  foreignKeys: Record<string, {
146
146
  name: string;
@@ -180,7 +180,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
180
180
  isUnique: boolean;
181
181
  using?: "btree" | "hash" | undefined;
182
182
  algorithm?: "default" | "inplace" | "copy" | undefined;
183
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
183
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
184
184
  }>;
185
185
  foreignKeys: Record<string, {
186
186
  name: string;
@@ -293,7 +293,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
293
293
  isUnique: boolean;
294
294
  using?: "btree" | "hash" | undefined;
295
295
  algorithm?: "default" | "inplace" | "copy" | undefined;
296
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
296
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
297
297
  }>;
298
298
  foreignKeys: Record<string, {
299
299
  name: string;
@@ -355,7 +355,7 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
355
355
  isUnique: boolean;
356
356
  using?: "btree" | "hash" | undefined;
357
357
  algorithm?: "default" | "inplace" | "copy" | undefined;
358
- lock?: "default" | "none" | "shared" | "exclusive" | undefined;
358
+ lock?: "none" | "default" | "shared" | "exclusive" | undefined;
359
359
  }>;
360
360
  foreignKeys: Record<string, {
361
361
  name: string;
@@ -613,6 +613,28 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
613
613
  columns: string[];
614
614
  nullsNotDistinct: boolean;
615
615
  }>>>;
616
+ policies: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
617
+ name: zod.ZodString;
618
+ as: zod.ZodOptional<zod.ZodEnum<["PERMISSIVE", "RESTRICTIVE"]>>;
619
+ for: zod.ZodOptional<zod.ZodEnum<["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]>>;
620
+ to: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
621
+ using: zod.ZodOptional<zod.ZodString>;
622
+ withCheck: zod.ZodOptional<zod.ZodString>;
623
+ }, "strict", zod.ZodTypeAny, {
624
+ name: string;
625
+ using?: string | undefined;
626
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
627
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
628
+ to?: string[] | undefined;
629
+ withCheck?: string | undefined;
630
+ }, {
631
+ name: string;
632
+ using?: string | undefined;
633
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
634
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
635
+ to?: string[] | undefined;
636
+ withCheck?: string | undefined;
637
+ }>>>;
616
638
  }, "strict", zod.ZodTypeAny, {
617
639
  name: string;
618
640
  columns: Record<string, {
@@ -676,6 +698,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
676
698
  columns: string[];
677
699
  nullsNotDistinct: boolean;
678
700
  }>;
701
+ policies: Record<string, {
702
+ name: string;
703
+ using?: string | undefined;
704
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
705
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
706
+ to?: string[] | undefined;
707
+ withCheck?: string | undefined;
708
+ }>;
679
709
  }, {
680
710
  name: string;
681
711
  columns: Record<string, {
@@ -739,6 +769,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
739
769
  columns: string[];
740
770
  nullsNotDistinct: boolean;
741
771
  }> | undefined;
772
+ policies?: Record<string, {
773
+ name: string;
774
+ using?: string | undefined;
775
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
776
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
777
+ to?: string[] | undefined;
778
+ withCheck?: string | undefined;
779
+ }> | undefined;
742
780
  }>>;
743
781
  enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
744
782
  name: zod.ZodString;
@@ -782,6 +820,22 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
782
820
  cache?: string | undefined;
783
821
  cycle?: boolean | undefined;
784
822
  }>>>;
823
+ roles: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
824
+ name: zod.ZodString;
825
+ createDb: zod.ZodOptional<zod.ZodBoolean>;
826
+ createRole: zod.ZodOptional<zod.ZodBoolean>;
827
+ inherit: zod.ZodOptional<zod.ZodBoolean>;
828
+ }, "strict", zod.ZodTypeAny, {
829
+ name: string;
830
+ createDb?: boolean | undefined;
831
+ createRole?: boolean | undefined;
832
+ inherit?: boolean | undefined;
833
+ }, {
834
+ name: string;
835
+ createDb?: boolean | undefined;
836
+ createRole?: boolean | undefined;
837
+ inherit?: boolean | undefined;
838
+ }>>>;
785
839
  _meta: zod.ZodObject<{
786
840
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
787
841
  tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
@@ -914,6 +968,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
914
968
  columns: string[];
915
969
  nullsNotDistinct: boolean;
916
970
  }>;
971
+ policies: Record<string, {
972
+ name: string;
973
+ using?: string | undefined;
974
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
975
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
976
+ to?: string[] | undefined;
977
+ withCheck?: string | undefined;
978
+ }>;
917
979
  }>;
918
980
  id: string;
919
981
  prevId: string;
@@ -940,6 +1002,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
940
1002
  cache?: string | undefined;
941
1003
  cycle?: boolean | undefined;
942
1004
  }>;
1005
+ roles: Record<string, {
1006
+ name: string;
1007
+ createDb?: boolean | undefined;
1008
+ createRole?: boolean | undefined;
1009
+ inherit?: boolean | undefined;
1010
+ }>;
943
1011
  internal?: {
944
1012
  tables: Record<string, {
945
1013
  columns: Record<string, {
@@ -1014,6 +1082,14 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1014
1082
  columns: string[];
1015
1083
  nullsNotDistinct: boolean;
1016
1084
  }> | undefined;
1085
+ policies?: Record<string, {
1086
+ name: string;
1087
+ using?: string | undefined;
1088
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1089
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1090
+ to?: string[] | undefined;
1091
+ withCheck?: string | undefined;
1092
+ }> | undefined;
1017
1093
  }>;
1018
1094
  id: string;
1019
1095
  prevId: string;
@@ -1050,6 +1126,12 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1050
1126
  cache?: string | undefined;
1051
1127
  cycle?: boolean | undefined;
1052
1128
  }> | undefined;
1129
+ roles?: Record<string, {
1130
+ name: string;
1131
+ createDb?: boolean | undefined;
1132
+ createRole?: boolean | undefined;
1133
+ inherit?: boolean | undefined;
1134
+ }> | undefined;
1053
1135
  }>;
1054
1136
  type PgSchema = TypeOf<typeof pgSchema>;
1055
1137
 
@@ -1485,6 +1567,14 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1485
1567
  columns: string[];
1486
1568
  nullsNotDistinct: boolean;
1487
1569
  }>;
1570
+ policies: Record<string, {
1571
+ name: string;
1572
+ as?: "PERMISSIVE" | "RESTRICTIVE" | undefined;
1573
+ for?: "ALL" | "SELECT" | "INSERT" | "UPDATE" | "DELETE" | undefined;
1574
+ to?: string[] | undefined;
1575
+ using?: string | undefined;
1576
+ withCheck?: string | undefined;
1577
+ }>;
1488
1578
  }>;
1489
1579
  enums: Record<string, {
1490
1580
  values: string[];
@@ -1502,6 +1592,12 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1502
1592
  cache?: string | undefined;
1503
1593
  cycle?: boolean | undefined;
1504
1594
  }>;
1595
+ roles: Record<string, {
1596
+ name: string;
1597
+ createDb?: boolean | undefined;
1598
+ createRole?: boolean | undefined;
1599
+ inherit?: boolean | undefined;
1600
+ }>;
1505
1601
  _meta: {
1506
1602
  tables: Record<string, string>;
1507
1603
  columns: Record<string, string>;