drizzle-kit 0.24.2 → 0.25.0-00e689e

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.
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,6 +120,16 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
119
120
  name: string;
120
121
  columns: string[];
121
122
  }>>>;
123
+ checkConstraint: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
124
+ name: zod.ZodString;
125
+ value: zod.ZodString;
126
+ }, "strict", zod.ZodTypeAny, {
127
+ name: string;
128
+ value: string;
129
+ }, {
130
+ name: string;
131
+ value: string;
132
+ }>>>;
122
133
  }, "strict", zod.ZodTypeAny, {
123
134
  name: string;
124
135
  columns: Record<string, {
@@ -159,6 +170,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
159
170
  name: string;
160
171
  columns: string[];
161
172
  }>;
173
+ checkConstraint: Record<string, {
174
+ name: string;
175
+ value: string;
176
+ }>;
162
177
  }, {
163
178
  name: string;
164
179
  columns: Record<string, {
@@ -199,6 +214,102 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
199
214
  name: string;
200
215
  columns: string[];
201
216
  }> | undefined;
217
+ checkConstraint?: Record<string, {
218
+ name: string;
219
+ value: string;
220
+ }> | undefined;
221
+ }>>;
222
+ views: zod.ZodRecord<zod.ZodString, zod.ZodObject<zod.objectUtil.extendShape<{
223
+ name: zod.ZodString;
224
+ columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
225
+ name: zod.ZodString;
226
+ type: zod.ZodString;
227
+ primaryKey: zod.ZodBoolean;
228
+ notNull: zod.ZodBoolean;
229
+ autoincrement: zod.ZodOptional<zod.ZodBoolean>;
230
+ default: zod.ZodOptional<zod.ZodAny>;
231
+ onUpdate: zod.ZodOptional<zod.ZodAny>;
232
+ generated: zod.ZodOptional<zod.ZodObject<{
233
+ type: zod.ZodEnum<["stored", "virtual"]>;
234
+ as: zod.ZodString;
235
+ }, "strip", zod.ZodTypeAny, {
236
+ type: "stored" | "virtual";
237
+ as: string;
238
+ }, {
239
+ type: "stored" | "virtual";
240
+ as: string;
241
+ }>>;
242
+ }, "strict", zod.ZodTypeAny, {
243
+ name: string;
244
+ type: string;
245
+ primaryKey: boolean;
246
+ notNull: boolean;
247
+ default?: any;
248
+ onUpdate?: any;
249
+ autoincrement?: boolean | undefined;
250
+ generated?: {
251
+ type: "stored" | "virtual";
252
+ as: string;
253
+ } | undefined;
254
+ }, {
255
+ name: string;
256
+ type: string;
257
+ primaryKey: boolean;
258
+ notNull: boolean;
259
+ default?: any;
260
+ onUpdate?: any;
261
+ autoincrement?: boolean | undefined;
262
+ generated?: {
263
+ type: "stored" | "virtual";
264
+ as: string;
265
+ } | undefined;
266
+ }>>;
267
+ definition: zod.ZodOptional<zod.ZodString>;
268
+ isExisting: zod.ZodBoolean;
269
+ }, {
270
+ algorithm: zod.ZodEnum<["undefined", "merge", "temptable"]>;
271
+ sqlSecurity: zod.ZodEnum<["definer", "invoker"]>;
272
+ withCheckOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
273
+ }>, "strict", zod.ZodTypeAny, {
274
+ name: string;
275
+ columns: Record<string, {
276
+ name: string;
277
+ type: string;
278
+ primaryKey: boolean;
279
+ notNull: boolean;
280
+ default?: any;
281
+ onUpdate?: any;
282
+ autoincrement?: boolean | undefined;
283
+ generated?: {
284
+ type: "stored" | "virtual";
285
+ as: string;
286
+ } | undefined;
287
+ }>;
288
+ algorithm: "undefined" | "merge" | "temptable";
289
+ sqlSecurity: "definer" | "invoker";
290
+ isExisting: boolean;
291
+ withCheckOption?: "local" | "cascaded" | undefined;
292
+ definition?: string | undefined;
293
+ }, {
294
+ name: string;
295
+ columns: Record<string, {
296
+ name: string;
297
+ type: string;
298
+ primaryKey: boolean;
299
+ notNull: boolean;
300
+ default?: any;
301
+ onUpdate?: any;
302
+ autoincrement?: boolean | undefined;
303
+ generated?: {
304
+ type: "stored" | "virtual";
305
+ as: string;
306
+ } | undefined;
307
+ }>;
308
+ algorithm: "undefined" | "merge" | "temptable";
309
+ sqlSecurity: "definer" | "invoker";
310
+ isExisting: boolean;
311
+ withCheckOption?: "local" | "cascaded" | undefined;
312
+ definition?: string | undefined;
202
313
  }>>;
203
314
  _meta: zod.ZodObject<{
204
315
  tables: zod.ZodRecord<zod.ZodString, zod.ZodString>;
@@ -312,6 +423,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
312
423
  name: string;
313
424
  columns: string[];
314
425
  }>;
426
+ checkConstraint: Record<string, {
427
+ name: string;
428
+ value: string;
429
+ }>;
315
430
  }>;
316
431
  id: string;
317
432
  prevId: string;
@@ -321,6 +436,27 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
321
436
  columns: Record<string, string>;
322
437
  tables: Record<string, string>;
323
438
  };
439
+ views: Record<string, {
440
+ name: string;
441
+ columns: Record<string, {
442
+ name: string;
443
+ type: string;
444
+ primaryKey: boolean;
445
+ notNull: boolean;
446
+ default?: any;
447
+ onUpdate?: any;
448
+ autoincrement?: boolean | undefined;
449
+ generated?: {
450
+ type: "stored" | "virtual";
451
+ as: string;
452
+ } | undefined;
453
+ }>;
454
+ algorithm: "undefined" | "merge" | "temptable";
455
+ sqlSecurity: "definer" | "invoker";
456
+ isExisting: boolean;
457
+ withCheckOption?: "local" | "cascaded" | undefined;
458
+ definition?: string | undefined;
459
+ }>;
324
460
  internal?: {
325
461
  indexes?: Record<string, {
326
462
  columns: Record<string, {
@@ -374,6 +510,10 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
374
510
  name: string;
375
511
  columns: string[];
376
512
  }> | undefined;
513
+ checkConstraint?: Record<string, {
514
+ name: string;
515
+ value: string;
516
+ }> | undefined;
377
517
  }>;
378
518
  id: string;
379
519
  prevId: string;
@@ -383,6 +523,27 @@ declare const schema$1: zod.ZodObject<zod.objectUtil.extendShape<{
383
523
  columns: Record<string, string>;
384
524
  tables: Record<string, string>;
385
525
  };
526
+ views: Record<string, {
527
+ name: string;
528
+ columns: Record<string, {
529
+ name: string;
530
+ type: string;
531
+ primaryKey: boolean;
532
+ notNull: boolean;
533
+ default?: any;
534
+ onUpdate?: any;
535
+ autoincrement?: boolean | undefined;
536
+ generated?: {
537
+ type: "stored" | "virtual";
538
+ as: string;
539
+ } | undefined;
540
+ }>;
541
+ algorithm: "undefined" | "merge" | "temptable";
542
+ sqlSecurity: "definer" | "invoker";
543
+ isExisting: boolean;
544
+ withCheckOption?: "local" | "cascaded" | undefined;
545
+ definition?: string | undefined;
546
+ }>;
386
547
  internal?: {
387
548
  indexes?: Record<string, {
388
549
  columns: Record<string, {
@@ -613,6 +774,16 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
613
774
  columns: string[];
614
775
  nullsNotDistinct: boolean;
615
776
  }>>>;
777
+ checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
778
+ name: zod.ZodString;
779
+ value: zod.ZodString;
780
+ }, "strict", zod.ZodTypeAny, {
781
+ name: string;
782
+ value: string;
783
+ }, {
784
+ name: string;
785
+ value: string;
786
+ }>>>;
616
787
  }, "strict", zod.ZodTypeAny, {
617
788
  name: string;
618
789
  columns: Record<string, {
@@ -676,6 +847,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
676
847
  columns: string[];
677
848
  nullsNotDistinct: boolean;
678
849
  }>;
850
+ checkConstraints: Record<string, {
851
+ name: string;
852
+ value: string;
853
+ }>;
679
854
  }, {
680
855
  name: string;
681
856
  columns: Record<string, {
@@ -739,6 +914,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
739
914
  columns: string[];
740
915
  nullsNotDistinct: boolean;
741
916
  }> | undefined;
917
+ checkConstraints?: Record<string, {
918
+ name: string;
919
+ value: string;
920
+ }> | undefined;
742
921
  }>>;
743
922
  enums: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
744
923
  name: zod.ZodString;
@@ -754,6 +933,303 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
754
933
  schema: string;
755
934
  }>>;
756
935
  schemas: zod.ZodRecord<zod.ZodString, zod.ZodString>;
936
+ views: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
937
+ name: zod.ZodString;
938
+ schema: zod.ZodString;
939
+ columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
940
+ name: zod.ZodString;
941
+ type: zod.ZodString;
942
+ typeSchema: zod.ZodOptional<zod.ZodString>;
943
+ primaryKey: zod.ZodBoolean;
944
+ notNull: zod.ZodBoolean;
945
+ default: zod.ZodOptional<zod.ZodAny>;
946
+ isUnique: zod.ZodOptional<zod.ZodAny>;
947
+ uniqueName: zod.ZodOptional<zod.ZodString>;
948
+ nullsNotDistinct: zod.ZodOptional<zod.ZodBoolean>;
949
+ generated: zod.ZodOptional<zod.ZodObject<{
950
+ type: zod.ZodLiteral<"stored">;
951
+ as: zod.ZodString;
952
+ }, "strip", zod.ZodTypeAny, {
953
+ type: "stored";
954
+ as: string;
955
+ }, {
956
+ type: "stored";
957
+ as: string;
958
+ }>>;
959
+ identity: zod.ZodOptional<zod.ZodObject<zod.objectUtil.extendShape<{
960
+ name: zod.ZodString;
961
+ increment: zod.ZodOptional<zod.ZodString>;
962
+ minValue: zod.ZodOptional<zod.ZodString>;
963
+ maxValue: zod.ZodOptional<zod.ZodString>;
964
+ startWith: zod.ZodOptional<zod.ZodString>;
965
+ cache: zod.ZodOptional<zod.ZodString>;
966
+ cycle: zod.ZodOptional<zod.ZodBoolean>;
967
+ schema: zod.ZodString;
968
+ }, {
969
+ type: zod.ZodEnum<["always", "byDefault"]>;
970
+ }>, "strip", zod.ZodTypeAny, {
971
+ name: string;
972
+ type: "always" | "byDefault";
973
+ schema: string;
974
+ increment?: string | undefined;
975
+ minValue?: string | undefined;
976
+ maxValue?: string | undefined;
977
+ startWith?: string | undefined;
978
+ cache?: string | undefined;
979
+ cycle?: boolean | undefined;
980
+ }, {
981
+ name: string;
982
+ type: "always" | "byDefault";
983
+ schema: string;
984
+ increment?: string | undefined;
985
+ minValue?: string | undefined;
986
+ maxValue?: string | undefined;
987
+ startWith?: string | undefined;
988
+ cache?: string | undefined;
989
+ cycle?: boolean | undefined;
990
+ }>>;
991
+ }, "strict", zod.ZodTypeAny, {
992
+ name: string;
993
+ type: string;
994
+ primaryKey: boolean;
995
+ notNull: boolean;
996
+ isUnique?: any;
997
+ default?: any;
998
+ generated?: {
999
+ type: "stored";
1000
+ as: string;
1001
+ } | undefined;
1002
+ typeSchema?: string | undefined;
1003
+ uniqueName?: string | undefined;
1004
+ nullsNotDistinct?: boolean | undefined;
1005
+ identity?: {
1006
+ name: string;
1007
+ type: "always" | "byDefault";
1008
+ schema: string;
1009
+ increment?: string | undefined;
1010
+ minValue?: string | undefined;
1011
+ maxValue?: string | undefined;
1012
+ startWith?: string | undefined;
1013
+ cache?: string | undefined;
1014
+ cycle?: boolean | undefined;
1015
+ } | undefined;
1016
+ }, {
1017
+ name: string;
1018
+ type: string;
1019
+ primaryKey: boolean;
1020
+ notNull: boolean;
1021
+ isUnique?: any;
1022
+ default?: any;
1023
+ generated?: {
1024
+ type: "stored";
1025
+ as: string;
1026
+ } | undefined;
1027
+ typeSchema?: string | undefined;
1028
+ uniqueName?: string | undefined;
1029
+ nullsNotDistinct?: boolean | undefined;
1030
+ identity?: {
1031
+ name: string;
1032
+ type: "always" | "byDefault";
1033
+ schema: string;
1034
+ increment?: string | undefined;
1035
+ minValue?: string | undefined;
1036
+ maxValue?: string | undefined;
1037
+ startWith?: string | undefined;
1038
+ cache?: string | undefined;
1039
+ cycle?: boolean | undefined;
1040
+ } | undefined;
1041
+ }>>;
1042
+ definition: zod.ZodOptional<zod.ZodString>;
1043
+ materialized: zod.ZodBoolean;
1044
+ with: zod.ZodOptional<zod.ZodObject<zod.objectUtil.extendShape<{
1045
+ checkOption: zod.ZodOptional<zod.ZodEnum<["local", "cascaded"]>>;
1046
+ securityBarrier: zod.ZodOptional<zod.ZodBoolean>;
1047
+ securityInvoker: zod.ZodOptional<zod.ZodBoolean>;
1048
+ }, {
1049
+ fillfactor: zod.ZodOptional<zod.ZodNumber>;
1050
+ toastTupleTarget: zod.ZodOptional<zod.ZodNumber>;
1051
+ parallelWorkers: zod.ZodOptional<zod.ZodNumber>;
1052
+ autovacuumEnabled: zod.ZodOptional<zod.ZodBoolean>;
1053
+ vacuumIndexCleanup: zod.ZodOptional<zod.ZodEnum<["auto", "off", "on"]>>;
1054
+ vacuumTruncate: zod.ZodOptional<zod.ZodBoolean>;
1055
+ autovacuumVacuumThreshold: zod.ZodOptional<zod.ZodNumber>;
1056
+ autovacuumVacuumScaleFactor: zod.ZodOptional<zod.ZodNumber>;
1057
+ autovacuumVacuumCostDelay: zod.ZodOptional<zod.ZodNumber>;
1058
+ autovacuumVacuumCostLimit: zod.ZodOptional<zod.ZodNumber>;
1059
+ autovacuumFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
1060
+ autovacuumFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
1061
+ autovacuumFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
1062
+ autovacuumMultixactFreezeMinAge: zod.ZodOptional<zod.ZodNumber>;
1063
+ autovacuumMultixactFreezeMaxAge: zod.ZodOptional<zod.ZodNumber>;
1064
+ autovacuumMultixactFreezeTableAge: zod.ZodOptional<zod.ZodNumber>;
1065
+ logAutovacuumMinDuration: zod.ZodOptional<zod.ZodNumber>;
1066
+ userCatalogTable: zod.ZodOptional<zod.ZodBoolean>;
1067
+ }>, "strict", zod.ZodTypeAny, {
1068
+ checkOption?: "local" | "cascaded" | undefined;
1069
+ securityBarrier?: boolean | undefined;
1070
+ securityInvoker?: boolean | undefined;
1071
+ fillfactor?: number | undefined;
1072
+ toastTupleTarget?: number | undefined;
1073
+ parallelWorkers?: number | undefined;
1074
+ autovacuumEnabled?: boolean | undefined;
1075
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1076
+ vacuumTruncate?: boolean | undefined;
1077
+ autovacuumVacuumThreshold?: number | undefined;
1078
+ autovacuumVacuumScaleFactor?: number | undefined;
1079
+ autovacuumVacuumCostDelay?: number | undefined;
1080
+ autovacuumVacuumCostLimit?: number | undefined;
1081
+ autovacuumFreezeMinAge?: number | undefined;
1082
+ autovacuumFreezeMaxAge?: number | undefined;
1083
+ autovacuumFreezeTableAge?: number | undefined;
1084
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1085
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1086
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1087
+ logAutovacuumMinDuration?: number | undefined;
1088
+ userCatalogTable?: boolean | undefined;
1089
+ }, {
1090
+ checkOption?: "local" | "cascaded" | undefined;
1091
+ securityBarrier?: boolean | undefined;
1092
+ securityInvoker?: boolean | undefined;
1093
+ fillfactor?: number | undefined;
1094
+ toastTupleTarget?: number | undefined;
1095
+ parallelWorkers?: number | undefined;
1096
+ autovacuumEnabled?: boolean | undefined;
1097
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1098
+ vacuumTruncate?: boolean | undefined;
1099
+ autovacuumVacuumThreshold?: number | undefined;
1100
+ autovacuumVacuumScaleFactor?: number | undefined;
1101
+ autovacuumVacuumCostDelay?: number | undefined;
1102
+ autovacuumVacuumCostLimit?: number | undefined;
1103
+ autovacuumFreezeMinAge?: number | undefined;
1104
+ autovacuumFreezeMaxAge?: number | undefined;
1105
+ autovacuumFreezeTableAge?: number | undefined;
1106
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1107
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1108
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1109
+ logAutovacuumMinDuration?: number | undefined;
1110
+ userCatalogTable?: boolean | undefined;
1111
+ }>>;
1112
+ isExisting: zod.ZodBoolean;
1113
+ withNoData: zod.ZodOptional<zod.ZodBoolean>;
1114
+ using: zod.ZodOptional<zod.ZodString>;
1115
+ tablespace: zod.ZodOptional<zod.ZodString>;
1116
+ }, "strict", zod.ZodTypeAny, {
1117
+ name: string;
1118
+ columns: Record<string, {
1119
+ name: string;
1120
+ type: string;
1121
+ primaryKey: boolean;
1122
+ notNull: boolean;
1123
+ isUnique?: any;
1124
+ default?: any;
1125
+ generated?: {
1126
+ type: "stored";
1127
+ as: string;
1128
+ } | undefined;
1129
+ typeSchema?: string | undefined;
1130
+ uniqueName?: string | undefined;
1131
+ nullsNotDistinct?: boolean | undefined;
1132
+ identity?: {
1133
+ name: string;
1134
+ type: "always" | "byDefault";
1135
+ schema: string;
1136
+ increment?: string | undefined;
1137
+ minValue?: string | undefined;
1138
+ maxValue?: string | undefined;
1139
+ startWith?: string | undefined;
1140
+ cache?: string | undefined;
1141
+ cycle?: boolean | undefined;
1142
+ } | undefined;
1143
+ }>;
1144
+ schema: string;
1145
+ isExisting: boolean;
1146
+ materialized: boolean;
1147
+ using?: string | undefined;
1148
+ definition?: string | undefined;
1149
+ with?: {
1150
+ checkOption?: "local" | "cascaded" | undefined;
1151
+ securityBarrier?: boolean | undefined;
1152
+ securityInvoker?: boolean | undefined;
1153
+ fillfactor?: number | undefined;
1154
+ toastTupleTarget?: number | undefined;
1155
+ parallelWorkers?: number | undefined;
1156
+ autovacuumEnabled?: boolean | undefined;
1157
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1158
+ vacuumTruncate?: boolean | undefined;
1159
+ autovacuumVacuumThreshold?: number | undefined;
1160
+ autovacuumVacuumScaleFactor?: number | undefined;
1161
+ autovacuumVacuumCostDelay?: number | undefined;
1162
+ autovacuumVacuumCostLimit?: number | undefined;
1163
+ autovacuumFreezeMinAge?: number | undefined;
1164
+ autovacuumFreezeMaxAge?: number | undefined;
1165
+ autovacuumFreezeTableAge?: number | undefined;
1166
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1167
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1168
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1169
+ logAutovacuumMinDuration?: number | undefined;
1170
+ userCatalogTable?: boolean | undefined;
1171
+ } | undefined;
1172
+ withNoData?: boolean | undefined;
1173
+ tablespace?: string | undefined;
1174
+ }, {
1175
+ name: string;
1176
+ columns: Record<string, {
1177
+ name: string;
1178
+ type: string;
1179
+ primaryKey: boolean;
1180
+ notNull: boolean;
1181
+ isUnique?: any;
1182
+ default?: any;
1183
+ generated?: {
1184
+ type: "stored";
1185
+ as: string;
1186
+ } | undefined;
1187
+ typeSchema?: string | undefined;
1188
+ uniqueName?: string | undefined;
1189
+ nullsNotDistinct?: boolean | undefined;
1190
+ identity?: {
1191
+ name: string;
1192
+ type: "always" | "byDefault";
1193
+ schema: string;
1194
+ increment?: string | undefined;
1195
+ minValue?: string | undefined;
1196
+ maxValue?: string | undefined;
1197
+ startWith?: string | undefined;
1198
+ cache?: string | undefined;
1199
+ cycle?: boolean | undefined;
1200
+ } | undefined;
1201
+ }>;
1202
+ schema: string;
1203
+ isExisting: boolean;
1204
+ materialized: boolean;
1205
+ using?: string | undefined;
1206
+ definition?: string | undefined;
1207
+ with?: {
1208
+ checkOption?: "local" | "cascaded" | undefined;
1209
+ securityBarrier?: boolean | undefined;
1210
+ securityInvoker?: boolean | undefined;
1211
+ fillfactor?: number | undefined;
1212
+ toastTupleTarget?: number | undefined;
1213
+ parallelWorkers?: number | undefined;
1214
+ autovacuumEnabled?: boolean | undefined;
1215
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1216
+ vacuumTruncate?: boolean | undefined;
1217
+ autovacuumVacuumThreshold?: number | undefined;
1218
+ autovacuumVacuumScaleFactor?: number | undefined;
1219
+ autovacuumVacuumCostDelay?: number | undefined;
1220
+ autovacuumVacuumCostLimit?: number | undefined;
1221
+ autovacuumFreezeMinAge?: number | undefined;
1222
+ autovacuumFreezeMaxAge?: number | undefined;
1223
+ autovacuumFreezeTableAge?: number | undefined;
1224
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1225
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1226
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1227
+ logAutovacuumMinDuration?: number | undefined;
1228
+ userCatalogTable?: boolean | undefined;
1229
+ } | undefined;
1230
+ withNoData?: boolean | undefined;
1231
+ tablespace?: string | undefined;
1232
+ }>>>;
757
1233
  sequences: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
758
1234
  name: zod.ZodString;
759
1235
  increment: zod.ZodOptional<zod.ZodString>;
@@ -914,6 +1390,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
914
1390
  columns: string[];
915
1391
  nullsNotDistinct: boolean;
916
1392
  }>;
1393
+ checkConstraints: Record<string, {
1394
+ name: string;
1395
+ value: string;
1396
+ }>;
917
1397
  }>;
918
1398
  id: string;
919
1399
  prevId: string;
@@ -925,6 +1405,65 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
925
1405
  tables: Record<string, string>;
926
1406
  schemas: Record<string, string>;
927
1407
  };
1408
+ views: Record<string, {
1409
+ name: string;
1410
+ columns: Record<string, {
1411
+ name: string;
1412
+ type: string;
1413
+ primaryKey: boolean;
1414
+ notNull: boolean;
1415
+ isUnique?: any;
1416
+ default?: any;
1417
+ generated?: {
1418
+ type: "stored";
1419
+ as: string;
1420
+ } | undefined;
1421
+ typeSchema?: string | undefined;
1422
+ uniqueName?: string | undefined;
1423
+ nullsNotDistinct?: boolean | undefined;
1424
+ identity?: {
1425
+ name: string;
1426
+ type: "always" | "byDefault";
1427
+ schema: string;
1428
+ increment?: string | undefined;
1429
+ minValue?: string | undefined;
1430
+ maxValue?: string | undefined;
1431
+ startWith?: string | undefined;
1432
+ cache?: string | undefined;
1433
+ cycle?: boolean | undefined;
1434
+ } | undefined;
1435
+ }>;
1436
+ schema: string;
1437
+ isExisting: boolean;
1438
+ materialized: boolean;
1439
+ using?: string | undefined;
1440
+ definition?: 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
+ withNoData?: boolean | undefined;
1465
+ tablespace?: string | undefined;
1466
+ }>;
928
1467
  enums: Record<string, {
929
1468
  name: string;
930
1469
  values: string[];
@@ -1014,6 +1553,10 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1014
1553
  columns: string[];
1015
1554
  nullsNotDistinct: boolean;
1016
1555
  }> | undefined;
1556
+ checkConstraints?: Record<string, {
1557
+ name: string;
1558
+ value: string;
1559
+ }> | undefined;
1017
1560
  }>;
1018
1561
  id: string;
1019
1562
  prevId: string;
@@ -1040,6 +1583,65 @@ declare const pgSchema: zod.ZodObject<zod.objectUtil.extendShape<{
1040
1583
  } | undefined>;
1041
1584
  } | undefined>;
1042
1585
  } | undefined;
1586
+ views?: Record<string, {
1587
+ name: string;
1588
+ columns: Record<string, {
1589
+ name: string;
1590
+ type: string;
1591
+ primaryKey: boolean;
1592
+ notNull: boolean;
1593
+ isUnique?: any;
1594
+ default?: any;
1595
+ generated?: {
1596
+ type: "stored";
1597
+ as: string;
1598
+ } | undefined;
1599
+ typeSchema?: string | undefined;
1600
+ uniqueName?: string | undefined;
1601
+ nullsNotDistinct?: boolean | undefined;
1602
+ identity?: {
1603
+ name: string;
1604
+ type: "always" | "byDefault";
1605
+ schema: string;
1606
+ increment?: string | undefined;
1607
+ minValue?: string | undefined;
1608
+ maxValue?: string | undefined;
1609
+ startWith?: string | undefined;
1610
+ cache?: string | undefined;
1611
+ cycle?: boolean | undefined;
1612
+ } | undefined;
1613
+ }>;
1614
+ schema: string;
1615
+ isExisting: boolean;
1616
+ materialized: boolean;
1617
+ using?: string | undefined;
1618
+ definition?: string | undefined;
1619
+ with?: {
1620
+ checkOption?: "local" | "cascaded" | undefined;
1621
+ securityBarrier?: boolean | undefined;
1622
+ securityInvoker?: boolean | undefined;
1623
+ fillfactor?: number | undefined;
1624
+ toastTupleTarget?: number | undefined;
1625
+ parallelWorkers?: number | undefined;
1626
+ autovacuumEnabled?: boolean | undefined;
1627
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
1628
+ vacuumTruncate?: boolean | undefined;
1629
+ autovacuumVacuumThreshold?: number | undefined;
1630
+ autovacuumVacuumScaleFactor?: number | undefined;
1631
+ autovacuumVacuumCostDelay?: number | undefined;
1632
+ autovacuumVacuumCostLimit?: number | undefined;
1633
+ autovacuumFreezeMinAge?: number | undefined;
1634
+ autovacuumFreezeMaxAge?: number | undefined;
1635
+ autovacuumFreezeTableAge?: number | undefined;
1636
+ autovacuumMultixactFreezeMinAge?: number | undefined;
1637
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
1638
+ autovacuumMultixactFreezeTableAge?: number | undefined;
1639
+ logAutovacuumMinDuration?: number | undefined;
1640
+ userCatalogTable?: boolean | undefined;
1641
+ } | undefined;
1642
+ withNoData?: boolean | undefined;
1643
+ tablespace?: string | undefined;
1644
+ }> | undefined;
1043
1645
  sequences?: Record<string, {
1044
1646
  name: string;
1045
1647
  schema: string;
@@ -1159,6 +1761,16 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1159
1761
  name: string;
1160
1762
  columns: string[];
1161
1763
  }>>>;
1764
+ checkConstraints: zod.ZodDefault<zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1765
+ name: zod.ZodString;
1766
+ value: zod.ZodString;
1767
+ }, "strict", zod.ZodTypeAny, {
1768
+ name: string;
1769
+ value: string;
1770
+ }, {
1771
+ name: string;
1772
+ value: string;
1773
+ }>>>;
1162
1774
  }, "strict", zod.ZodTypeAny, {
1163
1775
  name: string;
1164
1776
  columns: Record<string, {
@@ -1196,6 +1808,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1196
1808
  name: string;
1197
1809
  columns: string[];
1198
1810
  }>;
1811
+ checkConstraints: Record<string, {
1812
+ name: string;
1813
+ value: string;
1814
+ }>;
1199
1815
  }, {
1200
1816
  name: string;
1201
1817
  columns: Record<string, {
@@ -1233,6 +1849,87 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1233
1849
  name: string;
1234
1850
  columns: string[];
1235
1851
  }> | undefined;
1852
+ checkConstraints?: Record<string, {
1853
+ name: string;
1854
+ value: string;
1855
+ }> | undefined;
1856
+ }>>;
1857
+ views: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1858
+ name: zod.ZodString;
1859
+ columns: zod.ZodRecord<zod.ZodString, zod.ZodObject<{
1860
+ name: zod.ZodString;
1861
+ type: zod.ZodString;
1862
+ primaryKey: zod.ZodBoolean;
1863
+ notNull: zod.ZodBoolean;
1864
+ autoincrement: zod.ZodOptional<zod.ZodBoolean>;
1865
+ default: zod.ZodOptional<zod.ZodAny>;
1866
+ generated: zod.ZodOptional<zod.ZodObject<{
1867
+ type: zod.ZodEnum<["stored", "virtual"]>;
1868
+ as: zod.ZodString;
1869
+ }, "strip", zod.ZodTypeAny, {
1870
+ type: "stored" | "virtual";
1871
+ as: string;
1872
+ }, {
1873
+ type: "stored" | "virtual";
1874
+ as: string;
1875
+ }>>;
1876
+ }, "strict", zod.ZodTypeAny, {
1877
+ name: string;
1878
+ type: string;
1879
+ primaryKey: boolean;
1880
+ notNull: boolean;
1881
+ default?: any;
1882
+ autoincrement?: boolean | undefined;
1883
+ generated?: {
1884
+ type: "stored" | "virtual";
1885
+ as: string;
1886
+ } | undefined;
1887
+ }, {
1888
+ name: string;
1889
+ type: string;
1890
+ primaryKey: boolean;
1891
+ notNull: boolean;
1892
+ default?: any;
1893
+ autoincrement?: boolean | undefined;
1894
+ generated?: {
1895
+ type: "stored" | "virtual";
1896
+ as: string;
1897
+ } | undefined;
1898
+ }>>;
1899
+ definition: zod.ZodOptional<zod.ZodString>;
1900
+ isExisting: zod.ZodBoolean;
1901
+ }, "strict", zod.ZodTypeAny, {
1902
+ name: string;
1903
+ columns: Record<string, {
1904
+ name: string;
1905
+ type: string;
1906
+ primaryKey: boolean;
1907
+ notNull: boolean;
1908
+ default?: any;
1909
+ autoincrement?: boolean | undefined;
1910
+ generated?: {
1911
+ type: "stored" | "virtual";
1912
+ as: string;
1913
+ } | undefined;
1914
+ }>;
1915
+ isExisting: boolean;
1916
+ definition?: string | undefined;
1917
+ }, {
1918
+ name: string;
1919
+ columns: Record<string, {
1920
+ name: string;
1921
+ type: string;
1922
+ primaryKey: boolean;
1923
+ notNull: boolean;
1924
+ default?: any;
1925
+ autoincrement?: boolean | undefined;
1926
+ generated?: {
1927
+ type: "stored" | "virtual";
1928
+ as: string;
1929
+ } | undefined;
1930
+ }>;
1931
+ isExisting: boolean;
1932
+ definition?: string | undefined;
1236
1933
  }>>;
1237
1934
  enums: zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>;
1238
1935
  _meta: zod.ZodObject<{
@@ -1317,6 +2014,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1317
2014
  name: string;
1318
2015
  columns: string[];
1319
2016
  }>;
2017
+ checkConstraints: Record<string, {
2018
+ name: string;
2019
+ value: string;
2020
+ }>;
1320
2021
  }>;
1321
2022
  id: string;
1322
2023
  prevId: string;
@@ -1326,6 +2027,23 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1326
2027
  columns: Record<string, string>;
1327
2028
  tables: Record<string, string>;
1328
2029
  };
2030
+ views: Record<string, {
2031
+ name: string;
2032
+ columns: Record<string, {
2033
+ name: string;
2034
+ type: string;
2035
+ primaryKey: boolean;
2036
+ notNull: boolean;
2037
+ default?: any;
2038
+ autoincrement?: boolean | undefined;
2039
+ generated?: {
2040
+ type: "stored" | "virtual";
2041
+ as: string;
2042
+ } | undefined;
2043
+ }>;
2044
+ isExisting: boolean;
2045
+ definition?: string | undefined;
2046
+ }>;
1329
2047
  enums: {};
1330
2048
  internal?: {
1331
2049
  indexes?: Record<string, {
@@ -1372,6 +2090,10 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1372
2090
  name: string;
1373
2091
  columns: string[];
1374
2092
  }> | undefined;
2093
+ checkConstraints?: Record<string, {
2094
+ name: string;
2095
+ value: string;
2096
+ }> | undefined;
1375
2097
  }>;
1376
2098
  id: string;
1377
2099
  prevId: string;
@@ -1381,6 +2103,23 @@ declare const schema: zod.ZodObject<zod.objectUtil.extendShape<{
1381
2103
  columns: Record<string, string>;
1382
2104
  tables: Record<string, string>;
1383
2105
  };
2106
+ views: Record<string, {
2107
+ name: string;
2108
+ columns: Record<string, {
2109
+ name: string;
2110
+ type: string;
2111
+ primaryKey: boolean;
2112
+ notNull: boolean;
2113
+ default?: any;
2114
+ autoincrement?: boolean | undefined;
2115
+ generated?: {
2116
+ type: "stored" | "virtual";
2117
+ as: string;
2118
+ } | undefined;
2119
+ }>;
2120
+ isExisting: boolean;
2121
+ definition?: string | undefined;
2122
+ }>;
1384
2123
  enums: {};
1385
2124
  internal?: {
1386
2125
  indexes?: Record<string, {
@@ -1395,7 +2134,7 @@ type SQLiteSchema = TypeOf<typeof schema>;
1395
2134
  type DrizzleSnapshotJSON = PgSchema;
1396
2135
  type DrizzleSQLiteSnapshotJSON = SQLiteSchema;
1397
2136
  type DrizzleMySQLSnapshotJSON = MySqlSchema;
1398
- declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[]) => PgSchema;
2137
+ declare const generateDrizzleJson: (imports: Record<string, unknown>, prevId?: string, schemaFilters?: string[], casing?: CasingType) => PgSchema;
1399
2138
  declare const generateMigration: (prev: DrizzleSnapshotJSON, cur: DrizzleSnapshotJSON) => Promise<string[]>;
1400
2139
  declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: PgDatabase<any>, schemaFilters?: string[]) => Promise<{
1401
2140
  hasDataLoss: boolean;
@@ -1403,7 +2142,7 @@ declare const pushSchema: (imports: Record<string, unknown>, drizzleInstance: Pg
1403
2142
  statementsToExecute: string[];
1404
2143
  apply: () => Promise<void>;
1405
2144
  }>;
1406
- declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<SQLiteSchema>;
2145
+ declare const generateSQLiteDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<SQLiteSchema>;
1407
2146
  declare const generateSQLiteMigration: (prev: DrizzleSQLiteSnapshotJSON, cur: DrizzleSQLiteSnapshotJSON) => Promise<string[]>;
1408
2147
  declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstance: LibSQLDatabase<any>) => Promise<{
1409
2148
  hasDataLoss: boolean;
@@ -1411,7 +2150,7 @@ declare const pushSQLiteSchema: (imports: Record<string, unknown>, drizzleInstan
1411
2150
  statementsToExecute: string[];
1412
2151
  apply: () => Promise<void>;
1413
2152
  }>;
1414
- declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string) => Promise<MySqlSchema>;
2153
+ declare const generateMySQLDrizzleJson: (imports: Record<string, unknown>, prevId?: string, casing?: CasingType) => Promise<MySqlSchema>;
1415
2154
  declare const generateMySQLMigration: (prev: DrizzleMySQLSnapshotJSON, cur: DrizzleMySQLSnapshotJSON) => Promise<string[]>;
1416
2155
  declare const pushMySQLSchema: (imports: Record<string, unknown>, drizzleInstance: MySql2Database<any>, databaseName: string) => Promise<{
1417
2156
  hasDataLoss: boolean;
@@ -1485,6 +2224,10 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1485
2224
  columns: string[];
1486
2225
  nullsNotDistinct: boolean;
1487
2226
  }>;
2227
+ checkConstraints: Record<string, {
2228
+ value: string;
2229
+ name: string;
2230
+ }>;
1488
2231
  }>;
1489
2232
  enums: Record<string, {
1490
2233
  values: string[];
@@ -1492,6 +2235,65 @@ declare const upPgSnapshot: (snapshot: Record<string, unknown>) => {
1492
2235
  schema: string;
1493
2236
  }>;
1494
2237
  schemas: Record<string, string>;
2238
+ views: Record<string, {
2239
+ name: string;
2240
+ schema: string;
2241
+ columns: Record<string, {
2242
+ type: string;
2243
+ name: string;
2244
+ primaryKey: boolean;
2245
+ notNull: boolean;
2246
+ typeSchema?: string | undefined;
2247
+ default?: any;
2248
+ isUnique?: any;
2249
+ uniqueName?: string | undefined;
2250
+ nullsNotDistinct?: boolean | undefined;
2251
+ generated?: {
2252
+ type: "stored";
2253
+ as: string;
2254
+ } | undefined;
2255
+ identity?: {
2256
+ type: "always" | "byDefault";
2257
+ name: string;
2258
+ schema: string;
2259
+ increment?: string | undefined;
2260
+ minValue?: string | undefined;
2261
+ maxValue?: string | undefined;
2262
+ startWith?: string | undefined;
2263
+ cache?: string | undefined;
2264
+ cycle?: boolean | undefined;
2265
+ } | undefined;
2266
+ }>;
2267
+ materialized: boolean;
2268
+ isExisting: boolean;
2269
+ with?: {
2270
+ checkOption?: "local" | "cascaded" | undefined;
2271
+ securityBarrier?: boolean | undefined;
2272
+ securityInvoker?: boolean | undefined;
2273
+ fillfactor?: number | undefined;
2274
+ toastTupleTarget?: number | undefined;
2275
+ parallelWorkers?: number | undefined;
2276
+ autovacuumEnabled?: boolean | undefined;
2277
+ vacuumIndexCleanup?: "auto" | "off" | "on" | undefined;
2278
+ vacuumTruncate?: boolean | undefined;
2279
+ autovacuumVacuumThreshold?: number | undefined;
2280
+ autovacuumVacuumScaleFactor?: number | undefined;
2281
+ autovacuumVacuumCostDelay?: number | undefined;
2282
+ autovacuumVacuumCostLimit?: number | undefined;
2283
+ autovacuumFreezeMinAge?: number | undefined;
2284
+ autovacuumFreezeMaxAge?: number | undefined;
2285
+ autovacuumFreezeTableAge?: number | undefined;
2286
+ autovacuumMultixactFreezeMinAge?: number | undefined;
2287
+ autovacuumMultixactFreezeMaxAge?: number | undefined;
2288
+ autovacuumMultixactFreezeTableAge?: number | undefined;
2289
+ logAutovacuumMinDuration?: number | undefined;
2290
+ userCatalogTable?: boolean | undefined;
2291
+ } | undefined;
2292
+ definition?: string | undefined;
2293
+ withNoData?: boolean | undefined;
2294
+ using?: string | undefined;
2295
+ tablespace?: string | undefined;
2296
+ }>;
1495
2297
  sequences: Record<string, {
1496
2298
  name: string;
1497
2299
  schema: string;