drizzle-kit 0.21.2-cf9fe8d → 0.21.2-dec02d3
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/bin.cjs +18051 -11821
- package/index.d.mts +9 -1
- package/index.d.ts +9 -1
- package/package.json +4 -3
- package/payload.d.mts +10 -96
- package/payload.d.ts +10 -96
- package/payload.js +1303 -1638
- package/payload.mjs +1290 -1625
- package/utils-studio.js +614 -179
- package/utils-studio.mjs +614 -179
- package/utils.js +8 -90
- package/utils.mjs +8 -90
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 = "6";
|
|
1081
1081
|
|
|
1082
1082
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
|
1083
1083
|
var util;
|
|
@@ -5060,48 +5060,10 @@ 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
|
-
});
|
|
5070
5063
|
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({
|
|
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 indexV5 = objectType({
|
|
5089
5064
|
name: stringType(),
|
|
5090
5065
|
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)
|
|
5066
|
+
isUnique: booleanType()
|
|
5105
5067
|
}).strict();
|
|
5106
5068
|
var fk2 = objectType({
|
|
5107
5069
|
name: stringType(),
|
|
@@ -5143,27 +5105,9 @@ var tableV42 = objectType({
|
|
|
5143
5105
|
name: stringType(),
|
|
5144
5106
|
schema: stringType(),
|
|
5145
5107
|
columns: recordType(stringType(), column2),
|
|
5146
|
-
indexes: recordType(stringType(),
|
|
5108
|
+
indexes: recordType(stringType(), index2),
|
|
5147
5109
|
foreignKeys: recordType(stringType(), fk2)
|
|
5148
5110
|
}).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();
|
|
5167
5111
|
var table2 = objectType({
|
|
5168
5112
|
name: stringType(),
|
|
5169
5113
|
schema: stringType(),
|
|
@@ -5208,7 +5152,7 @@ var pgSchemaInternalV4 = objectType({
|
|
|
5208
5152
|
var pgSchemaInternalV5 = objectType({
|
|
5209
5153
|
version: literalType("5"),
|
|
5210
5154
|
dialect: literalType("pg"),
|
|
5211
|
-
tables: recordType(stringType(),
|
|
5155
|
+
tables: recordType(stringType(), table2),
|
|
5212
5156
|
enums: recordType(stringType(), enumSchemaV1),
|
|
5213
5157
|
schemas: recordType(stringType(), stringType()),
|
|
5214
5158
|
_meta: objectType({
|
|
@@ -5218,19 +5162,6 @@ var pgSchemaInternalV5 = objectType({
|
|
|
5218
5162
|
}),
|
|
5219
5163
|
internal: kitInternals2
|
|
5220
5164
|
}).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();
|
|
5234
5165
|
var pgSchemaExternal = objectType({
|
|
5235
5166
|
version: literalType("5"),
|
|
5236
5167
|
dialect: literalType("pg"),
|
|
@@ -5244,7 +5175,7 @@ var pgSchemaExternal = objectType({
|
|
|
5244
5175
|
})
|
|
5245
5176
|
}).strict();
|
|
5246
5177
|
var pgSchemaInternal = objectType({
|
|
5247
|
-
version: literalType("
|
|
5178
|
+
version: literalType("6"),
|
|
5248
5179
|
dialect: literalType("postgresql"),
|
|
5249
5180
|
tables: recordType(stringType(), table2),
|
|
5250
5181
|
enums: recordType(stringType(), enumSchema),
|
|
@@ -5279,15 +5210,8 @@ var pgSchemaSquashedV4 = objectType({
|
|
|
5279
5210
|
enums: recordType(stringType(), enumSchemaV1),
|
|
5280
5211
|
schemas: recordType(stringType(), stringType())
|
|
5281
5212
|
}).strict();
|
|
5282
|
-
var pgSchemaSquashedV6 = objectType({
|
|
5283
|
-
version: literalType("6"),
|
|
5284
|
-
dialect: literalType("postgresql"),
|
|
5285
|
-
tables: recordType(stringType(), tableSquashed2),
|
|
5286
|
-
enums: recordType(stringType(), enumSchema),
|
|
5287
|
-
schemas: recordType(stringType(), stringType())
|
|
5288
|
-
}).strict();
|
|
5289
5213
|
var pgSchemaSquashed = objectType({
|
|
5290
|
-
version: literalType("
|
|
5214
|
+
version: literalType("6"),
|
|
5291
5215
|
dialect: literalType("postgresql"),
|
|
5292
5216
|
tables: recordType(stringType(), tableSquashed2),
|
|
5293
5217
|
enums: recordType(stringType(), enumSchema),
|
|
@@ -5296,13 +5220,8 @@ var pgSchemaSquashed = objectType({
|
|
|
5296
5220
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
|
5297
5221
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
|
5298
5222
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
|
5299
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
|
5300
5223
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
5301
|
-
var backwardCompatiblePgSchema = unionType([
|
|
5302
|
-
pgSchemaV5,
|
|
5303
|
-
pgSchemaV6,
|
|
5304
|
-
pgSchema
|
|
5305
|
-
]);
|
|
5224
|
+
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
|
5306
5225
|
var dryPg = pgSchema.parse({
|
|
5307
5226
|
version: snapshotVersion,
|
|
5308
5227
|
dialect: "postgresql",
|
|
@@ -5480,7 +5399,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
|
5480
5399
|
var validatorForDialect = (dialect3) => {
|
|
5481
5400
|
switch (dialect3) {
|
|
5482
5401
|
case "postgresql":
|
|
5483
|
-
return { validator: backwardCompatiblePgSchema, version:
|
|
5402
|
+
return { validator: backwardCompatiblePgSchema, version: 6 };
|
|
5484
5403
|
case "sqlite":
|
|
5485
5404
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
|
5486
5405
|
case "mysql":
|
|
@@ -5503,7 +5422,6 @@ var validateWithReport = (snapshots, dialect3) => {
|
|
|
5503
5422
|
}
|
|
5504
5423
|
const result2 = validator.safeParse(raw);
|
|
5505
5424
|
if (!result2.success) {
|
|
5506
|
-
console.error(result2.error);
|
|
5507
5425
|
accum.malformed.push(it);
|
|
5508
5426
|
return accum;
|
|
5509
5427
|
}
|
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 = "6";
|
|
1072
1072
|
|
|
1073
1073
|
// node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs
|
|
1074
1074
|
var util;
|
|
@@ -5051,48 +5051,10 @@ 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
|
-
});
|
|
5061
5054
|
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({
|
|
5071
|
-
name: stringType(),
|
|
5072
|
-
columns: stringType().array(),
|
|
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
5055
|
name: stringType(),
|
|
5081
5056
|
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)
|
|
5057
|
+
isUnique: booleanType()
|
|
5096
5058
|
}).strict();
|
|
5097
5059
|
var fk2 = objectType({
|
|
5098
5060
|
name: stringType(),
|
|
@@ -5134,27 +5096,9 @@ var tableV42 = objectType({
|
|
|
5134
5096
|
name: stringType(),
|
|
5135
5097
|
schema: stringType(),
|
|
5136
5098
|
columns: recordType(stringType(), column2),
|
|
5137
|
-
indexes: recordType(stringType(),
|
|
5099
|
+
indexes: recordType(stringType(), index2),
|
|
5138
5100
|
foreignKeys: recordType(stringType(), fk2)
|
|
5139
5101
|
}).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();
|
|
5158
5102
|
var table2 = objectType({
|
|
5159
5103
|
name: stringType(),
|
|
5160
5104
|
schema: stringType(),
|
|
@@ -5199,7 +5143,7 @@ var pgSchemaInternalV4 = objectType({
|
|
|
5199
5143
|
var pgSchemaInternalV5 = objectType({
|
|
5200
5144
|
version: literalType("5"),
|
|
5201
5145
|
dialect: literalType("pg"),
|
|
5202
|
-
tables: recordType(stringType(),
|
|
5146
|
+
tables: recordType(stringType(), table2),
|
|
5203
5147
|
enums: recordType(stringType(), enumSchemaV1),
|
|
5204
5148
|
schemas: recordType(stringType(), stringType()),
|
|
5205
5149
|
_meta: objectType({
|
|
@@ -5209,19 +5153,6 @@ var pgSchemaInternalV5 = objectType({
|
|
|
5209
5153
|
}),
|
|
5210
5154
|
internal: kitInternals2
|
|
5211
5155
|
}).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();
|
|
5225
5156
|
var pgSchemaExternal = objectType({
|
|
5226
5157
|
version: literalType("5"),
|
|
5227
5158
|
dialect: literalType("pg"),
|
|
@@ -5235,7 +5166,7 @@ var pgSchemaExternal = objectType({
|
|
|
5235
5166
|
})
|
|
5236
5167
|
}).strict();
|
|
5237
5168
|
var pgSchemaInternal = objectType({
|
|
5238
|
-
version: literalType("
|
|
5169
|
+
version: literalType("6"),
|
|
5239
5170
|
dialect: literalType("postgresql"),
|
|
5240
5171
|
tables: recordType(stringType(), table2),
|
|
5241
5172
|
enums: recordType(stringType(), enumSchema),
|
|
@@ -5270,15 +5201,8 @@ var pgSchemaSquashedV4 = objectType({
|
|
|
5270
5201
|
enums: recordType(stringType(), enumSchemaV1),
|
|
5271
5202
|
schemas: recordType(stringType(), stringType())
|
|
5272
5203
|
}).strict();
|
|
5273
|
-
var pgSchemaSquashedV6 = objectType({
|
|
5274
|
-
version: literalType("6"),
|
|
5275
|
-
dialect: literalType("postgresql"),
|
|
5276
|
-
tables: recordType(stringType(), tableSquashed2),
|
|
5277
|
-
enums: recordType(stringType(), enumSchema),
|
|
5278
|
-
schemas: recordType(stringType(), stringType())
|
|
5279
|
-
}).strict();
|
|
5280
5204
|
var pgSchemaSquashed = objectType({
|
|
5281
|
-
version: literalType("
|
|
5205
|
+
version: literalType("6"),
|
|
5282
5206
|
dialect: literalType("postgresql"),
|
|
5283
5207
|
tables: recordType(stringType(), tableSquashed2),
|
|
5284
5208
|
enums: recordType(stringType(), enumSchema),
|
|
@@ -5287,13 +5211,8 @@ var pgSchemaSquashed = objectType({
|
|
|
5287
5211
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
|
5288
5212
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
|
5289
5213
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
|
5290
|
-
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
|
5291
5214
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
|
5292
|
-
var backwardCompatiblePgSchema = unionType([
|
|
5293
|
-
pgSchemaV5,
|
|
5294
|
-
pgSchemaV6,
|
|
5295
|
-
pgSchema
|
|
5296
|
-
]);
|
|
5215
|
+
var backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema]);
|
|
5297
5216
|
var dryPg = pgSchema.parse({
|
|
5298
5217
|
version: snapshotVersion,
|
|
5299
5218
|
dialect: "postgresql",
|
|
@@ -5471,7 +5390,7 @@ var prepareOutFolder = (out, dialect3) => {
|
|
|
5471
5390
|
var validatorForDialect = (dialect3) => {
|
|
5472
5391
|
switch (dialect3) {
|
|
5473
5392
|
case "postgresql":
|
|
5474
|
-
return { validator: backwardCompatiblePgSchema, version:
|
|
5393
|
+
return { validator: backwardCompatiblePgSchema, version: 6 };
|
|
5475
5394
|
case "sqlite":
|
|
5476
5395
|
return { validator: backwardCompatibleSqliteSchema, version: 6 };
|
|
5477
5396
|
case "mysql":
|
|
@@ -5494,7 +5413,6 @@ var validateWithReport = (snapshots, dialect3) => {
|
|
|
5494
5413
|
}
|
|
5495
5414
|
const result2 = validator.safeParse(raw);
|
|
5496
5415
|
if (!result2.success) {
|
|
5497
|
-
console.error(result2.error);
|
|
5498
5416
|
accum.malformed.push(it);
|
|
5499
5417
|
return accum;
|
|
5500
5418
|
}
|