drizzle-kit 0.25.0-680d055 → 0.25.0-a5a41e0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. package/api.d.mts +474 -0
  2. package/api.d.ts +474 -0
  3. package/api.js +33474 -26149
  4. package/api.mjs +33477 -26153
  5. package/bin.cjs +1254 -161
  6. package/package.json +1 -1
  7. package/utils.js +51 -11
  8. package/utils.mjs +51 -11
package/api.d.mts CHANGED
@@ -754,6 +754,303 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
754
754
  schema: string;
755
755
  }>>;
756
756
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
757
+ views: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
758
+ name: zod.ZodString;
759
+ schema: zod.ZodString;
760
+ columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
761
+ name: zod.ZodString;
762
+ type: zod.ZodString;
763
+ typeSchema: zod.ZodOptional<zod.ZodString>;
764
+ primaryKey: zod.ZodBoolean;
765
+ notNull: zod.ZodBoolean;
766
+ default: zod.ZodOptional<zod.ZodAny>;
767
+ isUnique: zod.ZodOptional<zod.ZodAny>;
768
+ uniqueName: zod.ZodOptional<zod.ZodString>;
769
+ nullsNotDistinct: zod.ZodOptional<zod.ZodBoolean>;
770
+ generated: zod.ZodOptional<zod.ZodObject<{
771
+ type: zod.ZodLiteral<"stored">;
772
+ as: zod.ZodString;
773
+ }, "strip", zod.ZodTypeAny, {
774
+ type: "stored";
775
+ as: string;
776
+ }, {
777
+ type: "stored";
778
+ as: string;
779
+ }>>;
780
+ identity: zod.ZodOptional<zod.ZodObject<zod.objectUtil.extendShape<{
781
+ name: zod.ZodString;
782
+ increment: zod.ZodOptional<zod.ZodString>;
783
+ minValue: zod.ZodOptional<zod.ZodString>;
784
+ maxValue: zod.ZodOptional<zod.ZodString>;
785
+ startWith: zod.ZodOptional<zod.ZodString>;
786
+ cache: zod.ZodOptional<zod.ZodString>;
787
+ cycle: zod.ZodOptional<zod.ZodBoolean>;
788
+ schema: zod.ZodString;
789
+ }, {
790
+ type: zod.ZodEnum<["always", "byDefault"]>;
791
+ }>, "strip", zod.ZodTypeAny, {
792
+ name: string;
793
+ type: "always" | "byDefault";
794
+ schema: string;
795
+ increment?: string | undefined;
796
+ minValue?: string | undefined;
797
+ maxValue?: string | undefined;
798
+ startWith?: string | undefined;
799
+ cache?: string | undefined;
800
+ cycle?: boolean | undefined;
801
+ }, {
802
+ name: string;
803
+ type: "always" | "byDefault";
804
+ schema: string;
805
+ increment?: string | undefined;
806
+ minValue?: string | undefined;
807
+ maxValue?: string | undefined;
808
+ startWith?: string | undefined;
809
+ cache?: string | undefined;
810
+ cycle?: boolean | undefined;
811
+ }>>;
812
+ }, "strict", zod.ZodTypeAny, {
813
+ name: string;
814
+ type: string;
815
+ primaryKey: boolean;
816
+ notNull: boolean;
817
+ isUnique?: any;
818
+ default?: any;
819
+ generated?: {
820
+ type: "stored";
821
+ as: string;
822
+ } | undefined;
823
+ typeSchema?: string | undefined;
824
+ uniqueName?: string | undefined;
825
+ nullsNotDistinct?: boolean | undefined;
826
+ identity?: {
827
+ name: string;
828
+ type: "always" | "byDefault";
829
+ schema: string;
830
+ increment?: string | undefined;
831
+ minValue?: string | undefined;
832
+ maxValue?: string | undefined;
833
+ startWith?: string | undefined;
834
+ cache?: string | undefined;
835
+ cycle?: boolean | undefined;
836
+ } | undefined;
837
+ }, {
838
+ name: string;
839
+ type: string;
840
+ primaryKey: boolean;
841
+ notNull: boolean;
842
+ isUnique?: any;
843
+ default?: any;
844
+ generated?: {
845
+ type: "stored";
846
+ as: string;
847
+ } | undefined;
848
+ typeSchema?: string | undefined;
849
+ uniqueName?: string | undefined;
850
+ nullsNotDistinct?: boolean | undefined;
851
+ identity?: {
852
+ name: string;
853
+ type: "always" | "byDefault";
854
+ schema: string;
855
+ increment?: string | undefined;
856
+ minValue?: string | undefined;
857
+ maxValue?: string | undefined;
858
+ startWith?: string | undefined;
859
+ cache?: string | undefined;
860
+ cycle?: boolean | undefined;
861
+ } | undefined;
862
+ }>>;
863
+ definition: zod.ZodOptional<zod.ZodString>;
864
+ materialized: zod.ZodBoolean;
865
+ with: zod.ZodOptional<zod.ZodObject<zod.objectUtil.extendShape<{
866
+ checkOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
867
+ securityBarrier: zod.ZodOptional<zod.ZodBoolean>;
868
+ securityInvoker: zod.ZodOptional<zod.ZodBoolean>;
869
+ }, {
870
+ fillfactor: zod.ZodOptional<zod.ZodNumber>;
871
+ toastTupleTarget: zod.ZodOptional<zod.ZodNumber>;
872
+ parallelWorkers: zod.ZodOptional<zod.ZodNumber>;
873
+ autovacuumEnabled: zod.ZodOptional<zod.ZodBoolean>;
874
+ vacuumIndexCleanup: zod.ZodOptional<zod.ZodEnum<["auto", "off", "on"]>>;
875
+ vacuumTruncate: zod.ZodOptional<zod.ZodBoolean>;
876
+ autovacuumVacuumThreshold: zod.ZodOptional<zod.ZodNumber>;
877
+ autovacuumVacuumScaleFactor: zod.ZodOptional<zod.ZodNumber>;
878
+ autovacuumVacuumCostDelay: zod.ZodOptional<zod.ZodNumber>;
879
+ autovacuumVacuumCostLimit: zod.ZodOptional<zod.ZodNumber>;
880
+ autovacuumFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
881
+ autovacuumFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
882
+ autovacuumFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
883
+ autovacuumMultixactFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
884
+ autovacuumMultixactFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
885
+ autovacuumMultixactFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
886
+ logAutovacuumMinDuration: zod.ZodOptional<zod.ZodNumber>;
887
+ userCatalogTable: zod.ZodOptional<zod.ZodBoolean>;
888
+ }>, "strict", zod.ZodTypeAny, {
889
+ checkOption?: "local" | "cascaded" | undefined;
890
+ securityBarrier?: boolean | undefined;
891
+ securityInvoker?: boolean | undefined;
892
+ fillfactor?: number | undefined;
893
+ toastTupleTarget?: number | undefined;
894
+ parallelWorkers?: number | undefined;
895
+ autovacuumEnabled?: boolean | undefined;
896
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
897
+ vacuumTruncate?: boolean | undefined;
898
+ autovacuumVacuumThreshold?: number | undefined;
899
+ autovacuumVacuumScaleFactor?: number | undefined;
900
+ autovacuumVacuumCostDelay?: number | undefined;
901
+ autovacuumVacuumCostLimit?: number | undefined;
902
+ autovacuumFreezeMinAge?: number | undefined;
903
+ autovacuumFreezeMaxAge?: number | undefined;
904
+ autovacuumFreezeTableAge?: number | undefined;
905
+ autovacuumMultixactFreezeMinAge?: number | undefined;
906
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
907
+ autovacuumMultixactFreezeTableAge?: number | undefined;
908
+ logAutovacuumMinDuration?: number | undefined;
909
+ userCatalogTable?: boolean | undefined;
910
+ }, {
911
+ checkOption?: "local" | "cascaded" | undefined;
912
+ securityBarrier?: boolean | undefined;
913
+ securityInvoker?: boolean | undefined;
914
+ fillfactor?: number | undefined;
915
+ toastTupleTarget?: number | undefined;
916
+ parallelWorkers?: number | undefined;
917
+ autovacuumEnabled?: boolean | undefined;
918
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
919
+ vacuumTruncate?: boolean | undefined;
920
+ autovacuumVacuumThreshold?: number | undefined;
921
+ autovacuumVacuumScaleFactor?: number | undefined;
922
+ autovacuumVacuumCostDelay?: number | undefined;
923
+ autovacuumVacuumCostLimit?: number | undefined;
924
+ autovacuumFreezeMinAge?: number | undefined;
925
+ autovacuumFreezeMaxAge?: number | undefined;
926
+ autovacuumFreezeTableAge?: number | undefined;
927
+ autovacuumMultixactFreezeMinAge?: number | undefined;
928
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
929
+ autovacuumMultixactFreezeTableAge?: number | undefined;
930
+ logAutovacuumMinDuration?: number | undefined;
931
+ userCatalogTable?: boolean | undefined;
932
+ }>>;
933
+ isExisting: zod.ZodBoolean;
934
+ withNoData: zod.ZodOptional<zod.ZodBoolean>;
935
+ using: zod.ZodOptional<zod.ZodString>;
936
+ tablespace: zod.ZodOptional<zod.ZodString>;
937
+ }, "strict", zod.ZodTypeAny, {
938
+ name: string;
939
+ columns: Record<string, {
940
+ name: string;
941
+ type: string;
942
+ primaryKey: boolean;
943
+ notNull: boolean;
944
+ isUnique?: any;
945
+ default?: any;
946
+ generated?: {
947
+ type: "stored";
948
+ as: string;
949
+ } | undefined;
950
+ typeSchema?: string | undefined;
951
+ uniqueName?: string | undefined;
952
+ nullsNotDistinct?: boolean | undefined;
953
+ identity?: {
954
+ name: string;
955
+ type: "always" | "byDefault";
956
+ schema: string;
957
+ increment?: string | undefined;
958
+ minValue?: string | undefined;
959
+ maxValue?: string | undefined;
960
+ startWith?: string | undefined;
961
+ cache?: string | undefined;
962
+ cycle?: boolean | undefined;
963
+ } | undefined;
964
+ }>;
965
+ schema: string;
966
+ materialized: boolean;
967
+ isExisting: boolean;
968
+ using?: string | undefined;
969
+ with?: {
970
+ checkOption?: "local" | "cascaded" | undefined;
971
+ securityBarrier?: boolean | undefined;
972
+ securityInvoker?: boolean | undefined;
973
+ fillfactor?: number | undefined;
974
+ toastTupleTarget?: number | undefined;
975
+ parallelWorkers?: number | undefined;
976
+ autovacuumEnabled?: boolean | undefined;
977
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
978
+ vacuumTruncate?: boolean | undefined;
979
+ autovacuumVacuumThreshold?: number | undefined;
980
+ autovacuumVacuumScaleFactor?: number | undefined;
981
+ autovacuumVacuumCostDelay?: number | undefined;
982
+ autovacuumVacuumCostLimit?: number | undefined;
983
+ autovacuumFreezeMinAge?: number | undefined;
984
+ autovacuumFreezeMaxAge?: number | undefined;
985
+ autovacuumFreezeTableAge?: number | undefined;
986
+ autovacuumMultixactFreezeMinAge?: number | undefined;
987
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
988
+ autovacuumMultixactFreezeTableAge?: number | undefined;
989
+ logAutovacuumMinDuration?: number | undefined;
990
+ userCatalogTable?: boolean | undefined;
991
+ } | undefined;
992
+ definition?: string | undefined;
993
+ withNoData?: boolean | undefined;
994
+ tablespace?: string | undefined;
995
+ }, {
996
+ name: string;
997
+ columns: Record<string, {
998
+ name: string;
999
+ type: string;
1000
+ primaryKey: boolean;
1001
+ notNull: boolean;
1002
+ isUnique?: any;
1003
+ default?: any;
1004
+ generated?: {
1005
+ type: "stored";
1006
+ as: string;
1007
+ } | undefined;
1008
+ typeSchema?: string | undefined;
1009
+ uniqueName?: string | undefined;
1010
+ nullsNotDistinct?: boolean | undefined;
1011
+ identity?: {
1012
+ name: string;
1013
+ type: "always" | "byDefault";
1014
+ schema: string;
1015
+ increment?: string | undefined;
1016
+ minValue?: string | undefined;
1017
+ maxValue?: string | undefined;
1018
+ startWith?: string | undefined;
1019
+ cache?: string | undefined;
1020
+ cycle?: boolean | undefined;
1021
+ } | undefined;
1022
+ }>;
1023
+ schema: string;
1024
+ materialized: boolean;
1025
+ isExisting: boolean;
1026
+ using?: string | undefined;
1027
+ with?: {
1028
+ checkOption?: "local" | "cascaded" | undefined;
1029
+ securityBarrier?: boolean | undefined;
1030
+ securityInvoker?: boolean | undefined;
1031
+ fillfactor?: number | undefined;
1032
+ toastTupleTarget?: number | undefined;
1033
+ parallelWorkers?: number | undefined;
1034
+ autovacuumEnabled?: boolean | undefined;
1035
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1036
+ vacuumTruncate?: boolean | undefined;
1037
+ autovacuumVacuumThreshold?: number | undefined;
1038
+ autovacuumVacuumScaleFactor?: number | undefined;
1039
+ autovacuumVacuumCostDelay?: number | undefined;
1040
+ autovacuumVacuumCostLimit?: number | undefined;
1041
+ autovacuumFreezeMinAge?: number | undefined;
1042
+ autovacuumFreezeMaxAge?: number | undefined;
1043
+ autovacuumFreezeTableAge?: number | undefined;
1044
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1045
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1046
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1047
+ logAutovacuumMinDuration?: number | undefined;
1048
+ userCatalogTable?: boolean | undefined;
1049
+ } | undefined;
1050
+ definition?: string | undefined;
1051
+ withNoData?: boolean | undefined;
1052
+ tablespace?: string | undefined;
1053
+ }>>>;
757
1054
  sequences: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
758
1055
  name: zod.ZodString;
759
1056
  increment: zod.ZodOptional<zod.ZodString>;
@@ -940,6 +1237,65 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
940
1237
  cache?: string | undefined;
941
1238
  cycle?: boolean | undefined;
942
1239
  }>;
1240
+ views: Record<string, {
1241
+ name: string;
1242
+ columns: Record<string, {
1243
+ name: string;
1244
+ type: string;
1245
+ primaryKey: boolean;
1246
+ notNull: boolean;
1247
+ isUnique?: any;
1248
+ default?: any;
1249
+ generated?: {
1250
+ type: "stored";
1251
+ as: string;
1252
+ } | undefined;
1253
+ typeSchema?: string | undefined;
1254
+ uniqueName?: string | undefined;
1255
+ nullsNotDistinct?: boolean | undefined;
1256
+ identity?: {
1257
+ name: string;
1258
+ type: "always" | "byDefault";
1259
+ schema: string;
1260
+ increment?: string | undefined;
1261
+ minValue?: string | undefined;
1262
+ maxValue?: string | undefined;
1263
+ startWith?: string | undefined;
1264
+ cache?: string | undefined;
1265
+ cycle?: boolean | undefined;
1266
+ } | undefined;
1267
+ }>;
1268
+ schema: string;
1269
+ materialized: boolean;
1270
+ isExisting: boolean;
1271
+ using?: string | undefined;
1272
+ with?: {
1273
+ checkOption?: "local" | "cascaded" | undefined;
1274
+ securityBarrier?: boolean | undefined;
1275
+ securityInvoker?: boolean | undefined;
1276
+ fillfactor?: number | undefined;
1277
+ toastTupleTarget?: number | undefined;
1278
+ parallelWorkers?: number | undefined;
1279
+ autovacuumEnabled?: boolean | undefined;
1280
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1281
+ vacuumTruncate?: boolean | undefined;
1282
+ autovacuumVacuumThreshold?: number | undefined;
1283
+ autovacuumVacuumScaleFactor?: number | undefined;
1284
+ autovacuumVacuumCostDelay?: number | undefined;
1285
+ autovacuumVacuumCostLimit?: number | undefined;
1286
+ autovacuumFreezeMinAge?: number | undefined;
1287
+ autovacuumFreezeMaxAge?: number | undefined;
1288
+ autovacuumFreezeTableAge?: number | undefined;
1289
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1290
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1291
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1292
+ logAutovacuumMinDuration?: number | undefined;
1293
+ userCatalogTable?: boolean | undefined;
1294
+ } | undefined;
1295
+ definition?: string | undefined;
1296
+ withNoData?: boolean | undefined;
1297
+ tablespace?: string | undefined;
1298
+ }>;
943
1299
  internal?: {
944
1300
  tables: Record<string, {
945
1301
  columns: Record<string, {
@@ -1050,6 +1406,65 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1050
1406
  cache?: string | undefined;
1051
1407
  cycle?: boolean | undefined;
1052
1408
  }> | undefined;
1409
+ views?: Record<string, {
1410
+ name: string;
1411
+ columns: Record<string, {
1412
+ name: string;
1413
+ type: string;
1414
+ primaryKey: boolean;
1415
+ notNull: boolean;
1416
+ isUnique?: any;
1417
+ default?: any;
1418
+ generated?: {
1419
+ type: "stored";
1420
+ as: string;
1421
+ } | undefined;
1422
+ typeSchema?: string | undefined;
1423
+ uniqueName?: string | undefined;
1424
+ nullsNotDistinct?: boolean | undefined;
1425
+ identity?: {
1426
+ name: string;
1427
+ type: "always" | "byDefault";
1428
+ schema: string;
1429
+ increment?: string | undefined;
1430
+ minValue?: string | undefined;
1431
+ maxValue?: string | undefined;
1432
+ startWith?: string | undefined;
1433
+ cache?: string | undefined;
1434
+ cycle?: boolean | undefined;
1435
+ } | undefined;
1436
+ }>;
1437
+ schema: string;
1438
+ materialized: boolean;
1439
+ isExisting: boolean;
1440
+ using?: string | undefined;
1441
+ with?: {
1442
+ checkOption?: "local" | "cascaded" | undefined;
1443
+ securityBarrier?: boolean | undefined;
1444
+ securityInvoker?: boolean | undefined;
1445
+ fillfactor?: number | undefined;
1446
+ toastTupleTarget?: number | undefined;
1447
+ parallelWorkers?: number | undefined;
1448
+ autovacuumEnabled?: boolean | undefined;
1449
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1450
+ vacuumTruncate?: boolean | undefined;
1451
+ autovacuumVacuumThreshold?: number | undefined;
1452
+ autovacuumVacuumScaleFactor?: number | undefined;
1453
+ autovacuumVacuumCostDelay?: number | undefined;
1454
+ autovacuumVacuumCostLimit?: number | undefined;
1455
+ autovacuumFreezeMinAge?: number | undefined;
1456
+ autovacuumFreezeMaxAge?: number | undefined;
1457
+ autovacuumFreezeTableAge?: number | undefined;
1458
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1459
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1460
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1461
+ logAutovacuumMinDuration?: number | undefined;
1462
+ userCatalogTable?: boolean | undefined;
1463
+ } | undefined;
1464
+ definition?: string | undefined;
1465
+ withNoData?: boolean | undefined;
1466
+ tablespace?: string | undefined;
1467
+ }> | undefined;
1053
1468
  }>;
1054
1469
  type PgSchema = TypeOf<typeof pgSchema>;
1055
1470
 
@@ -1492,6 +1907,65 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1492
1907
  schema: string;
1493
1908
  }>;
1494
1909
  schemas: Record<string, string>;
1910
+ views: Record<string, {
1911
+ name: string;
1912
+ schema: string;
1913
+ columns: Record<string, {
1914
+ type: string;
1915
+ name: string;
1916
+ primaryKey: boolean;
1917
+ notNull: boolean;
1918
+ typeSchema?: string | undefined;
1919
+ default?: any;
1920
+ isUnique?: any;
1921
+ uniqueName?: string | undefined;
1922
+ nullsNotDistinct?: boolean | undefined;
1923
+ generated?: {
1924
+ type: "stored";
1925
+ as: string;
1926
+ } | undefined;
1927
+ identity?: {
1928
+ type: "always" | "byDefault";
1929
+ name: string;
1930
+ schema: string;
1931
+ increment?: string | undefined;
1932
+ minValue?: string | undefined;
1933
+ maxValue?: string | undefined;
1934
+ startWith?: string | undefined;
1935
+ cache?: string | undefined;
1936
+ cycle?: boolean | undefined;
1937
+ } | undefined;
1938
+ }>;
1939
+ materialized: boolean;
1940
+ isExisting: boolean;
1941
+ with?: {
1942
+ checkOption?: "local" | "cascaded" | undefined;
1943
+ securityBarrier?: boolean | undefined;
1944
+ securityInvoker?: boolean | undefined;
1945
+ fillfactor?: number | undefined;
1946
+ toastTupleTarget?: number | undefined;
1947
+ parallelWorkers?: number | undefined;
1948
+ autovacuumEnabled?: boolean | undefined;
1949
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1950
+ vacuumTruncate?: boolean | undefined;
1951
+ autovacuumVacuumThreshold?: number | undefined;
1952
+ autovacuumVacuumScaleFactor?: number | undefined;
1953
+ autovacuumVacuumCostDelay?: number | undefined;
1954
+ autovacuumVacuumCostLimit?: number | undefined;
1955
+ autovacuumFreezeMinAge?: number | undefined;
1956
+ autovacuumFreezeMaxAge?: number | undefined;
1957
+ autovacuumFreezeTableAge?: number | undefined;
1958
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1959
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1960
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1961
+ logAutovacuumMinDuration?: number | undefined;
1962
+ userCatalogTable?: boolean | undefined;
1963
+ } | undefined;
1964
+ definition?: string | undefined;
1965
+ withNoData?: boolean | undefined;
1966
+ using?: string | undefined;
1967
+ tablespace?: string | undefined;
1968
+ }>;
1495
1969
  sequences: Record<string, {
1496
1970
  name: string;
1497
1971
  schema: string;