drizzle-kit 0.21.1 → 0.21.2-1ddc155
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +4699 -3859
- package/package.json +3 -3
- package/payload.d.mts +96 -10
- package/payload.d.ts +96 -10
- package/payload.js +1589 -1153
- package/payload.mjs +1589 -1153
- package/utils-studio.js +167 -23
- package/utils-studio.mjs +167 -23
- package/utils.js +89 -8
- package/utils.mjs +89 -8
package/utils.js
CHANGED
@@ -1077,7 +1077,7 @@ var info = (msg, greyMsg = "") => {
|
|
1077
1077
|
|
1078
1078
|
// src/global.ts
|
1079
1079
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1080
|
-
var snapshotVersion = "
|
1080
|
+
var snapshotVersion = "7";
|
1081
1081
|
|
1082
1082
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
1083
1083
|
var util;
|
@@ -5060,10 +5060,48 @@ var pgSchemaV1 = objectType({
|
|
5060
5060
|
tables: recordType(stringType(), tableV1),
|
5061
5061
|
enums: recordType(stringType(), enumSchemaV1)
|
5062
5062
|
}).strict();
|
5063
|
+
var indexColumn = objectType({
|
5064
|
+
expression: stringType(),
|
5065
|
+
isExpression: booleanType(),
|
5066
|
+
asc: booleanType(),
|
5067
|
+
nulls: stringType().optional(),
|
5068
|
+
opclass: stringType().optional()
|
5069
|
+
});
|
5063
5070
|
var index2 = objectType({
|
5071
|
+
name: stringType(),
|
5072
|
+
columns: indexColumn.array(),
|
5073
|
+
isUnique: booleanType(),
|
5074
|
+
with: recordType(stringType(), anyType()).optional(),
|
5075
|
+
method: stringType().default("btree"),
|
5076
|
+
where: stringType().optional(),
|
5077
|
+
concurrently: booleanType().default(false)
|
5078
|
+
}).strict();
|
5079
|
+
var indexV4 = objectType({
|
5064
5080
|
name: stringType(),
|
5065
5081
|
columns: stringType().array(),
|
5066
|
-
isUnique: booleanType()
|
5082
|
+
isUnique: booleanType(),
|
5083
|
+
with: recordType(stringType(), stringType()).optional(),
|
5084
|
+
method: stringType().default("btree"),
|
5085
|
+
where: stringType().optional(),
|
5086
|
+
concurrently: booleanType().default(false)
|
5087
|
+
}).strict();
|
5088
|
+
var indexV5 = objectType({
|
5089
|
+
name: stringType(),
|
5090
|
+
columns: stringType().array(),
|
5091
|
+
isUnique: booleanType(),
|
5092
|
+
with: recordType(stringType(), stringType()).optional(),
|
5093
|
+
method: stringType().default("btree"),
|
5094
|
+
where: stringType().optional(),
|
5095
|
+
concurrently: booleanType().default(false)
|
5096
|
+
}).strict();
|
5097
|
+
var indexV6 = objectType({
|
5098
|
+
name: stringType(),
|
5099
|
+
columns: stringType().array(),
|
5100
|
+
isUnique: booleanType(),
|
5101
|
+
with: recordType(stringType(), stringType()).optional(),
|
5102
|
+
method: stringType().default("btree"),
|
5103
|
+
where: stringType().optional(),
|
5104
|
+
concurrently: booleanType().default(false)
|
5067
5105
|
}).strict();
|
5068
5106
|
var fk2 = objectType({
|
5069
5107
|
name: stringType(),
|
@@ -5105,9 +5143,27 @@ var tableV42 = objectType({
|
|
5105
5143
|
name: stringType(),
|
5106
5144
|
schema: stringType(),
|
5107
5145
|
columns: recordType(stringType(), column2),
|
5108
|
-
indexes: recordType(stringType(),
|
5146
|
+
indexes: recordType(stringType(), indexV4),
|
5109
5147
|
foreignKeys: recordType(stringType(), fk2)
|
5110
5148
|
}).strict();
|
5149
|
+
var tableV6 = objectType({
|
5150
|
+
name: stringType(),
|
5151
|
+
schema: stringType(),
|
5152
|
+
columns: recordType(stringType(), column2),
|
5153
|
+
indexes: recordType(stringType(), indexV6),
|
5154
|
+
foreignKeys: recordType(stringType(), fk2),
|
5155
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5156
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5157
|
+
}).strict();
|
5158
|
+
var tableV5 = objectType({
|
5159
|
+
name: stringType(),
|
5160
|
+
schema: stringType(),
|
5161
|
+
columns: recordType(stringType(), column2),
|
5162
|
+
indexes: recordType(stringType(), indexV5),
|
5163
|
+
foreignKeys: recordType(stringType(), fk2),
|
5164
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5165
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5166
|
+
}).strict();
|
5111
5167
|
var table2 = objectType({
|
5112
5168
|
name: stringType(),
|
5113
5169
|
schema: stringType(),
|
@@ -5152,7 +5208,7 @@ var pgSchemaInternalV4 = objectType({
|
|
5152
5208
|
var pgSchemaInternalV5 = objectType({
|
5153
5209
|
version: literalType("5"),
|
5154
5210
|
dialect: literalType("pg"),
|
5155
|
-
tables: recordType(stringType(),
|
5211
|
+
tables: recordType(stringType(), tableV5),
|
5156
5212
|
enums: recordType(stringType(), enumSchemaV1),
|
5157
5213
|
schemas: recordType(stringType(), stringType()),
|
5158
5214
|
_meta: objectType({
|
@@ -5162,6 +5218,19 @@ var pgSchemaInternalV5 = objectType({
|
|
5162
5218
|
}),
|
5163
5219
|
internal: kitInternals2
|
5164
5220
|
}).strict();
|
5221
|
+
var pgSchemaInternalV6 = objectType({
|
5222
|
+
version: literalType("6"),
|
5223
|
+
dialect: literalType("postgresql"),
|
5224
|
+
tables: recordType(stringType(), tableV6),
|
5225
|
+
enums: recordType(stringType(), enumSchema),
|
5226
|
+
schemas: recordType(stringType(), stringType()),
|
5227
|
+
_meta: objectType({
|
5228
|
+
schemas: recordType(stringType(), stringType()),
|
5229
|
+
tables: recordType(stringType(), stringType()),
|
5230
|
+
columns: recordType(stringType(), stringType())
|
5231
|
+
}),
|
5232
|
+
internal: kitInternals2
|
5233
|
+
}).strict();
|
5165
5234
|
var pgSchemaExternal = objectType({
|
5166
5235
|
version: literalType("5"),
|
5167
5236
|
dialect: literalType("pg"),
|
@@ -5175,7 +5244,7 @@ var pgSchemaExternal = objectType({
|
|
5175
5244
|
})
|
5176
5245
|
}).strict();
|
5177
5246
|
var pgSchemaInternal = objectType({
|
5178
|
-
version: literalType("
|
5247
|
+
version: literalType("7"),
|
5179
5248
|
dialect: literalType("postgresql"),
|
5180
5249
|
tables: recordType(stringType(), table2),
|
5181
5250
|
enums: recordType(stringType(), enumSchema),
|
@@ -5210,18 +5279,30 @@ var pgSchemaSquashedV4 = objectType({
|
|
5210
5279
|
enums: recordType(stringType(), enumSchemaV1),
|
5211
5280
|
schemas: recordType(stringType(), stringType())
|
5212
5281
|
}).strict();
|
5213
|
-
var
|
5282
|
+
var pgSchemaSquashedV6 = objectType({
|
5214
5283
|
version: literalType("6"),
|
5215
5284
|
dialect: literalType("postgresql"),
|
5216
5285
|
tables: recordType(stringType(), tableSquashed2),
|
5217
5286
|
enums: recordType(stringType(), enumSchema),
|
5218
5287
|
schemas: recordType(stringType(), stringType())
|
5219
5288
|
}).strict();
|
5289
|
+
var pgSchemaSquashed = objectType({
|
5290
|
+
version: literalType("7"),
|
5291
|
+
dialect: literalType("postgresql"),
|
5292
|
+
tables: recordType(stringType(), tableSquashed2),
|
5293
|
+
enums: recordType(stringType(), enumSchema),
|
5294
|
+
schemas: recordType(stringType(), stringType())
|
5295
|
+
}).strict();
|
5220
5296
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5221
5297
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5222
5298
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5299
|
+
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5223
5300
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5224
|
-
var backwardCompatiblePgSchema = unionType([
|
5301
|
+
var backwardCompatiblePgSchema = unionType([
|
5302
|
+
pgSchemaV5,
|
5303
|
+
pgSchemaV6,
|
5304
|
+
pgSchema
|
5305
|
+
]);
|
5225
5306
|
var dryPg = pgSchema.parse({
|
5226
5307
|
version: snapshotVersion,
|
5227
5308
|
dialect: "postgresql",
|
@@ -5399,7 +5480,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5399
5480
|
var validatorForDialect = (dialect3) => {
|
5400
5481
|
switch (dialect3) {
|
5401
5482
|
case "postgresql":
|
5402
|
-
return { validator: backwardCompatiblePgSchema, version:
|
5483
|
+
return { validator: backwardCompatiblePgSchema, version: 7 };
|
5403
5484
|
case "sqlite":
|
5404
5485
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
5405
5486
|
case "mysql":
|
package/utils.mjs
CHANGED
@@ -1068,7 +1068,7 @@ var info = (msg, greyMsg = "") => {
|
|
1068
1068
|
|
1069
1069
|
// src/global.ts
|
1070
1070
|
var originUUID = "00000000-0000-0000-0000-000000000000";
|
1071
|
-
var snapshotVersion = "
|
1071
|
+
var snapshotVersion = "7";
|
1072
1072
|
|
1073
1073
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
1074
1074
|
var util;
|
@@ -5051,10 +5051,48 @@ var pgSchemaV1 = objectType({
|
|
5051
5051
|
tables: recordType(stringType(), tableV1),
|
5052
5052
|
enums: recordType(stringType(), enumSchemaV1)
|
5053
5053
|
}).strict();
|
5054
|
+
var indexColumn = objectType({
|
5055
|
+
expression: stringType(),
|
5056
|
+
isExpression: booleanType(),
|
5057
|
+
asc: booleanType(),
|
5058
|
+
nulls: stringType().optional(),
|
5059
|
+
opclass: stringType().optional()
|
5060
|
+
});
|
5054
5061
|
var index2 = objectType({
|
5062
|
+
name: stringType(),
|
5063
|
+
columns: indexColumn.array(),
|
5064
|
+
isUnique: booleanType(),
|
5065
|
+
with: recordType(stringType(), anyType()).optional(),
|
5066
|
+
method: stringType().default("btree"),
|
5067
|
+
where: stringType().optional(),
|
5068
|
+
concurrently: booleanType().default(false)
|
5069
|
+
}).strict();
|
5070
|
+
var indexV4 = objectType({
|
5055
5071
|
name: stringType(),
|
5056
5072
|
columns: stringType().array(),
|
5057
|
-
isUnique: booleanType()
|
5073
|
+
isUnique: booleanType(),
|
5074
|
+
with: recordType(stringType(), stringType()).optional(),
|
5075
|
+
method: stringType().default("btree"),
|
5076
|
+
where: stringType().optional(),
|
5077
|
+
concurrently: booleanType().default(false)
|
5078
|
+
}).strict();
|
5079
|
+
var indexV5 = objectType({
|
5080
|
+
name: stringType(),
|
5081
|
+
columns: stringType().array(),
|
5082
|
+
isUnique: booleanType(),
|
5083
|
+
with: recordType(stringType(), stringType()).optional(),
|
5084
|
+
method: stringType().default("btree"),
|
5085
|
+
where: stringType().optional(),
|
5086
|
+
concurrently: booleanType().default(false)
|
5087
|
+
}).strict();
|
5088
|
+
var indexV6 = objectType({
|
5089
|
+
name: stringType(),
|
5090
|
+
columns: stringType().array(),
|
5091
|
+
isUnique: booleanType(),
|
5092
|
+
with: recordType(stringType(), stringType()).optional(),
|
5093
|
+
method: stringType().default("btree"),
|
5094
|
+
where: stringType().optional(),
|
5095
|
+
concurrently: booleanType().default(false)
|
5058
5096
|
}).strict();
|
5059
5097
|
var fk2 = objectType({
|
5060
5098
|
name: stringType(),
|
@@ -5096,9 +5134,27 @@ var tableV42 = objectType({
|
|
5096
5134
|
name: stringType(),
|
5097
5135
|
schema: stringType(),
|
5098
5136
|
columns: recordType(stringType(), column2),
|
5099
|
-
indexes: recordType(stringType(),
|
5137
|
+
indexes: recordType(stringType(), indexV4),
|
5100
5138
|
foreignKeys: recordType(stringType(), fk2)
|
5101
5139
|
}).strict();
|
5140
|
+
var tableV6 = objectType({
|
5141
|
+
name: stringType(),
|
5142
|
+
schema: stringType(),
|
5143
|
+
columns: recordType(stringType(), column2),
|
5144
|
+
indexes: recordType(stringType(), indexV6),
|
5145
|
+
foreignKeys: recordType(stringType(), fk2),
|
5146
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5147
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5148
|
+
}).strict();
|
5149
|
+
var tableV5 = objectType({
|
5150
|
+
name: stringType(),
|
5151
|
+
schema: stringType(),
|
5152
|
+
columns: recordType(stringType(), column2),
|
5153
|
+
indexes: recordType(stringType(), indexV5),
|
5154
|
+
foreignKeys: recordType(stringType(), fk2),
|
5155
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5156
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5157
|
+
}).strict();
|
5102
5158
|
var table2 = objectType({
|
5103
5159
|
name: stringType(),
|
5104
5160
|
schema: stringType(),
|
@@ -5143,7 +5199,7 @@ var pgSchemaInternalV4 = objectType({
|
|
5143
5199
|
var pgSchemaInternalV5 = objectType({
|
5144
5200
|
version: literalType("5"),
|
5145
5201
|
dialect: literalType("pg"),
|
5146
|
-
tables: recordType(stringType(),
|
5202
|
+
tables: recordType(stringType(), tableV5),
|
5147
5203
|
enums: recordType(stringType(), enumSchemaV1),
|
5148
5204
|
schemas: recordType(stringType(), stringType()),
|
5149
5205
|
_meta: objectType({
|
@@ -5153,6 +5209,19 @@ var pgSchemaInternalV5 = objectType({
|
|
5153
5209
|
}),
|
5154
5210
|
internal: kitInternals2
|
5155
5211
|
}).strict();
|
5212
|
+
var pgSchemaInternalV6 = objectType({
|
5213
|
+
version: literalType("6"),
|
5214
|
+
dialect: literalType("postgresql"),
|
5215
|
+
tables: recordType(stringType(), tableV6),
|
5216
|
+
enums: recordType(stringType(), enumSchema),
|
5217
|
+
schemas: recordType(stringType(), stringType()),
|
5218
|
+
_meta: objectType({
|
5219
|
+
schemas: recordType(stringType(), stringType()),
|
5220
|
+
tables: recordType(stringType(), stringType()),
|
5221
|
+
columns: recordType(stringType(), stringType())
|
5222
|
+
}),
|
5223
|
+
internal: kitInternals2
|
5224
|
+
}).strict();
|
5156
5225
|
var pgSchemaExternal = objectType({
|
5157
5226
|
version: literalType("5"),
|
5158
5227
|
dialect: literalType("pg"),
|
@@ -5166,7 +5235,7 @@ var pgSchemaExternal = objectType({
|
|
5166
5235
|
})
|
5167
5236
|
}).strict();
|
5168
5237
|
var pgSchemaInternal = objectType({
|
5169
|
-
version: literalType("
|
5238
|
+
version: literalType("7"),
|
5170
5239
|
dialect: literalType("postgresql"),
|
5171
5240
|
tables: recordType(stringType(), table2),
|
5172
5241
|
enums: recordType(stringType(), enumSchema),
|
@@ -5201,18 +5270,30 @@ var pgSchemaSquashedV4 = objectType({
|
|
5201
5270
|
enums: recordType(stringType(), enumSchemaV1),
|
5202
5271
|
schemas: recordType(stringType(), stringType())
|
5203
5272
|
}).strict();
|
5204
|
-
var
|
5273
|
+
var pgSchemaSquashedV6 = objectType({
|
5205
5274
|
version: literalType("6"),
|
5206
5275
|
dialect: literalType("postgresql"),
|
5207
5276
|
tables: recordType(stringType(), tableSquashed2),
|
5208
5277
|
enums: recordType(stringType(), enumSchema),
|
5209
5278
|
schemas: recordType(stringType(), stringType())
|
5210
5279
|
}).strict();
|
5280
|
+
var pgSchemaSquashed = objectType({
|
5281
|
+
version: literalType("7"),
|
5282
|
+
dialect: literalType("postgresql"),
|
5283
|
+
tables: recordType(stringType(), tableSquashed2),
|
5284
|
+
enums: recordType(stringType(), enumSchema),
|
5285
|
+
schemas: recordType(stringType(), stringType())
|
5286
|
+
}).strict();
|
5211
5287
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5212
5288
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5213
5289
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5290
|
+
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5214
5291
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5215
|
-
var backwardCompatiblePgSchema = unionType([
|
5292
|
+
var backwardCompatiblePgSchema = unionType([
|
5293
|
+
pgSchemaV5,
|
5294
|
+
pgSchemaV6,
|
5295
|
+
pgSchema
|
5296
|
+
]);
|
5216
5297
|
var dryPg = pgSchema.parse({
|
5217
5298
|
version: snapshotVersion,
|
5218
5299
|
dialect: "postgresql",
|
@@ -5390,7 +5471,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
5390
5471
|
var validatorForDialect = (dialect3) => {
|
5391
5472
|
switch (dialect3) {
|
5392
5473
|
case "postgresql":
|
5393
|
-
return { validator: backwardCompatiblePgSchema, version:
|
5474
|
+
return { validator: backwardCompatiblePgSchema, version: 7 };
|
5394
5475
|
case "sqlite":
|
5395
5476
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
5396
5477
|
case "mysql":
|