drizzle-kit 0.22.6 → 0.22.7-0d9043a
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +5481 -3687
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/package.json +2 -2
- package/payload.d.mts +269 -6
- package/payload.d.ts +269 -6
- package/payload.js +2847 -1743
- package/payload.mjs +2848 -1745
- package/utils.js +90 -8
- package/utils.mjs +90 -8
package/utils.js
CHANGED
@@ -4874,7 +4874,11 @@ var column = objectType({
|
|
4874
4874
|
notNull: booleanType(),
|
4875
4875
|
autoincrement: booleanType().optional(),
|
4876
4876
|
default: anyType().optional(),
|
4877
|
-
onUpdate: anyType().optional()
|
4877
|
+
onUpdate: anyType().optional(),
|
4878
|
+
generated: objectType({
|
4879
|
+
type: enumType(["stored", "virtual"]),
|
4880
|
+
as: stringType()
|
4881
|
+
}).optional()
|
4878
4882
|
}).strict();
|
4879
4883
|
var tableV3 = objectType({
|
4880
4884
|
name: stringType(),
|
@@ -5126,7 +5130,22 @@ var fk2 = objectType({
|
|
5126
5130
|
onUpdate: stringType().optional(),
|
5127
5131
|
onDelete: stringType().optional()
|
5128
5132
|
}).strict();
|
5129
|
-
var
|
5133
|
+
var sequenceSchema = objectType({
|
5134
|
+
name: stringType(),
|
5135
|
+
increment: stringType().optional(),
|
5136
|
+
minValue: stringType().optional(),
|
5137
|
+
maxValue: stringType().optional(),
|
5138
|
+
startWith: stringType().optional(),
|
5139
|
+
cache: stringType().optional(),
|
5140
|
+
cycle: booleanType().optional(),
|
5141
|
+
schema: stringType()
|
5142
|
+
}).strict();
|
5143
|
+
var sequenceSquashed = objectType({
|
5144
|
+
name: stringType(),
|
5145
|
+
schema: stringType(),
|
5146
|
+
values: stringType()
|
5147
|
+
}).strict();
|
5148
|
+
var columnV7 = objectType({
|
5130
5149
|
name: stringType(),
|
5131
5150
|
type: stringType(),
|
5132
5151
|
typeSchema: stringType().optional(),
|
@@ -5137,6 +5156,38 @@ var column2 = objectType({
|
|
5137
5156
|
uniqueName: stringType().optional(),
|
5138
5157
|
nullsNotDistinct: booleanType().optional()
|
5139
5158
|
}).strict();
|
5159
|
+
var column2 = objectType({
|
5160
|
+
name: stringType(),
|
5161
|
+
type: stringType(),
|
5162
|
+
typeSchema: stringType().optional(),
|
5163
|
+
primaryKey: booleanType(),
|
5164
|
+
notNull: booleanType(),
|
5165
|
+
default: anyType().optional(),
|
5166
|
+
isUnique: anyType().optional(),
|
5167
|
+
uniqueName: stringType().optional(),
|
5168
|
+
nullsNotDistinct: booleanType().optional(),
|
5169
|
+
generated: objectType({
|
5170
|
+
type: literalType("stored"),
|
5171
|
+
as: stringType()
|
5172
|
+
}).optional(),
|
5173
|
+
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5174
|
+
}).strict();
|
5175
|
+
var columnSquashed = objectType({
|
5176
|
+
name: stringType(),
|
5177
|
+
type: stringType(),
|
5178
|
+
typeSchema: stringType().optional(),
|
5179
|
+
primaryKey: booleanType(),
|
5180
|
+
notNull: booleanType(),
|
5181
|
+
default: anyType().optional(),
|
5182
|
+
isUnique: anyType().optional(),
|
5183
|
+
uniqueName: stringType().optional(),
|
5184
|
+
nullsNotDistinct: booleanType().optional(),
|
5185
|
+
generated: objectType({
|
5186
|
+
type: literalType("stored"),
|
5187
|
+
as: stringType()
|
5188
|
+
}).optional(),
|
5189
|
+
identity: stringType().optional()
|
5190
|
+
}).strict();
|
5140
5191
|
var tableV32 = objectType({
|
5141
5192
|
name: stringType(),
|
5142
5193
|
columns: recordType(stringType(), column2),
|
@@ -5159,6 +5210,15 @@ var tableV42 = objectType({
|
|
5159
5210
|
indexes: recordType(stringType(), indexV4),
|
5160
5211
|
foreignKeys: recordType(stringType(), fk2)
|
5161
5212
|
}).strict();
|
5213
|
+
var tableV5 = objectType({
|
5214
|
+
name: stringType(),
|
5215
|
+
schema: stringType(),
|
5216
|
+
columns: recordType(stringType(), column2),
|
5217
|
+
indexes: recordType(stringType(), indexV5),
|
5218
|
+
foreignKeys: recordType(stringType(), fk2),
|
5219
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5220
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5221
|
+
}).strict();
|
5162
5222
|
var tableV6 = objectType({
|
5163
5223
|
name: stringType(),
|
5164
5224
|
schema: stringType(),
|
@@ -5168,11 +5228,11 @@ var tableV6 = objectType({
|
|
5168
5228
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5169
5229
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5170
5230
|
}).strict();
|
5171
|
-
var
|
5231
|
+
var tableV7 = objectType({
|
5172
5232
|
name: stringType(),
|
5173
5233
|
schema: stringType(),
|
5174
|
-
columns: recordType(stringType(),
|
5175
|
-
indexes: recordType(stringType(),
|
5234
|
+
columns: recordType(stringType(), columnV7),
|
5235
|
+
indexes: recordType(stringType(), index2),
|
5176
5236
|
foreignKeys: recordType(stringType(), fk2),
|
5177
5237
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5178
5238
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
@@ -5256,12 +5316,27 @@ var pgSchemaExternal = objectType({
|
|
5256
5316
|
columns: recordType(stringType(), stringType())
|
5257
5317
|
})
|
5258
5318
|
}).strict();
|
5319
|
+
var pgSchemaInternalV7 = objectType({
|
5320
|
+
version: literalType("7"),
|
5321
|
+
dialect: literalType("postgresql"),
|
5322
|
+
tables: recordType(stringType(), tableV7),
|
5323
|
+
enums: recordType(stringType(), enumSchema),
|
5324
|
+
schemas: recordType(stringType(), stringType()),
|
5325
|
+
sequences: recordType(stringType(), sequenceSchema),
|
5326
|
+
_meta: objectType({
|
5327
|
+
schemas: recordType(stringType(), stringType()),
|
5328
|
+
tables: recordType(stringType(), stringType()),
|
5329
|
+
columns: recordType(stringType(), stringType())
|
5330
|
+
}),
|
5331
|
+
internal: kitInternals2
|
5332
|
+
}).strict();
|
5259
5333
|
var pgSchemaInternal = objectType({
|
5260
5334
|
version: literalType("7"),
|
5261
5335
|
dialect: literalType("postgresql"),
|
5262
5336
|
tables: recordType(stringType(), table2),
|
5263
5337
|
enums: recordType(stringType(), enumSchema),
|
5264
5338
|
schemas: recordType(stringType(), stringType()),
|
5339
|
+
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5265
5340
|
_meta: objectType({
|
5266
5341
|
schemas: recordType(stringType(), stringType()),
|
5267
5342
|
tables: recordType(stringType(), stringType()),
|
@@ -5272,7 +5347,7 @@ var pgSchemaInternal = objectType({
|
|
5272
5347
|
var tableSquashed2 = objectType({
|
5273
5348
|
name: stringType(),
|
5274
5349
|
schema: stringType(),
|
5275
|
-
columns: recordType(stringType(),
|
5350
|
+
columns: recordType(stringType(), columnSquashed),
|
5276
5351
|
indexes: recordType(stringType(), stringType()),
|
5277
5352
|
foreignKeys: recordType(stringType(), stringType()),
|
5278
5353
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5304,12 +5379,14 @@ var pgSchemaSquashed = objectType({
|
|
5304
5379
|
dialect: literalType("postgresql"),
|
5305
5380
|
tables: recordType(stringType(), tableSquashed2),
|
5306
5381
|
enums: recordType(stringType(), enumSchema),
|
5307
|
-
schemas: recordType(stringType(), stringType())
|
5382
|
+
schemas: recordType(stringType(), stringType()),
|
5383
|
+
sequences: recordType(stringType(), sequenceSquashed)
|
5308
5384
|
}).strict();
|
5309
5385
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5310
5386
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5311
5387
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5312
5388
|
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5389
|
+
var pgSchemaV7 = pgSchemaInternalV7.merge(schemaHash2);
|
5313
5390
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5314
5391
|
var backwardCompatiblePgSchema = unionType([
|
5315
5392
|
pgSchemaV5,
|
@@ -5324,6 +5401,7 @@ var dryPg = pgSchema.parse({
|
|
5324
5401
|
tables: {},
|
5325
5402
|
enums: {},
|
5326
5403
|
schemas: {},
|
5404
|
+
sequences: {},
|
5327
5405
|
_meta: {
|
5328
5406
|
schemas: {},
|
5329
5407
|
tables: {},
|
@@ -5357,7 +5435,11 @@ var column3 = objectType({
|
|
5357
5435
|
primaryKey: booleanType(),
|
5358
5436
|
notNull: booleanType(),
|
5359
5437
|
autoincrement: booleanType().optional(),
|
5360
|
-
default: anyType().optional()
|
5438
|
+
default: anyType().optional(),
|
5439
|
+
generated: objectType({
|
5440
|
+
type: enumType(["stored", "virtual"]),
|
5441
|
+
as: stringType()
|
5442
|
+
}).optional()
|
5361
5443
|
}).strict();
|
5362
5444
|
var tableV33 = objectType({
|
5363
5445
|
name: stringType(),
|
package/utils.mjs
CHANGED
@@ -4864,7 +4864,11 @@ var column = objectType({
|
|
4864
4864
|
notNull: booleanType(),
|
4865
4865
|
autoincrement: booleanType().optional(),
|
4866
4866
|
default: anyType().optional(),
|
4867
|
-
onUpdate: anyType().optional()
|
4867
|
+
onUpdate: anyType().optional(),
|
4868
|
+
generated: objectType({
|
4869
|
+
type: enumType(["stored", "virtual"]),
|
4870
|
+
as: stringType()
|
4871
|
+
}).optional()
|
4868
4872
|
}).strict();
|
4869
4873
|
var tableV3 = objectType({
|
4870
4874
|
name: stringType(),
|
@@ -5116,7 +5120,22 @@ var fk2 = objectType({
|
|
5116
5120
|
onUpdate: stringType().optional(),
|
5117
5121
|
onDelete: stringType().optional()
|
5118
5122
|
}).strict();
|
5119
|
-
var
|
5123
|
+
var sequenceSchema = objectType({
|
5124
|
+
name: stringType(),
|
5125
|
+
increment: stringType().optional(),
|
5126
|
+
minValue: stringType().optional(),
|
5127
|
+
maxValue: stringType().optional(),
|
5128
|
+
startWith: stringType().optional(),
|
5129
|
+
cache: stringType().optional(),
|
5130
|
+
cycle: booleanType().optional(),
|
5131
|
+
schema: stringType()
|
5132
|
+
}).strict();
|
5133
|
+
var sequenceSquashed = objectType({
|
5134
|
+
name: stringType(),
|
5135
|
+
schema: stringType(),
|
5136
|
+
values: stringType()
|
5137
|
+
}).strict();
|
5138
|
+
var columnV7 = objectType({
|
5120
5139
|
name: stringType(),
|
5121
5140
|
type: stringType(),
|
5122
5141
|
typeSchema: stringType().optional(),
|
@@ -5127,6 +5146,38 @@ var column2 = objectType({
|
|
5127
5146
|
uniqueName: stringType().optional(),
|
5128
5147
|
nullsNotDistinct: booleanType().optional()
|
5129
5148
|
}).strict();
|
5149
|
+
var column2 = objectType({
|
5150
|
+
name: stringType(),
|
5151
|
+
type: stringType(),
|
5152
|
+
typeSchema: stringType().optional(),
|
5153
|
+
primaryKey: booleanType(),
|
5154
|
+
notNull: booleanType(),
|
5155
|
+
default: anyType().optional(),
|
5156
|
+
isUnique: anyType().optional(),
|
5157
|
+
uniqueName: stringType().optional(),
|
5158
|
+
nullsNotDistinct: booleanType().optional(),
|
5159
|
+
generated: objectType({
|
5160
|
+
type: literalType("stored"),
|
5161
|
+
as: stringType()
|
5162
|
+
}).optional(),
|
5163
|
+
identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
|
5164
|
+
}).strict();
|
5165
|
+
var columnSquashed = objectType({
|
5166
|
+
name: stringType(),
|
5167
|
+
type: stringType(),
|
5168
|
+
typeSchema: stringType().optional(),
|
5169
|
+
primaryKey: booleanType(),
|
5170
|
+
notNull: booleanType(),
|
5171
|
+
default: anyType().optional(),
|
5172
|
+
isUnique: anyType().optional(),
|
5173
|
+
uniqueName: stringType().optional(),
|
5174
|
+
nullsNotDistinct: booleanType().optional(),
|
5175
|
+
generated: objectType({
|
5176
|
+
type: literalType("stored"),
|
5177
|
+
as: stringType()
|
5178
|
+
}).optional(),
|
5179
|
+
identity: stringType().optional()
|
5180
|
+
}).strict();
|
5130
5181
|
var tableV32 = objectType({
|
5131
5182
|
name: stringType(),
|
5132
5183
|
columns: recordType(stringType(), column2),
|
@@ -5149,6 +5200,15 @@ var tableV42 = objectType({
|
|
5149
5200
|
indexes: recordType(stringType(), indexV4),
|
5150
5201
|
foreignKeys: recordType(stringType(), fk2)
|
5151
5202
|
}).strict();
|
5203
|
+
var tableV5 = objectType({
|
5204
|
+
name: stringType(),
|
5205
|
+
schema: stringType(),
|
5206
|
+
columns: recordType(stringType(), column2),
|
5207
|
+
indexes: recordType(stringType(), indexV5),
|
5208
|
+
foreignKeys: recordType(stringType(), fk2),
|
5209
|
+
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5210
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5211
|
+
}).strict();
|
5152
5212
|
var tableV6 = objectType({
|
5153
5213
|
name: stringType(),
|
5154
5214
|
schema: stringType(),
|
@@ -5158,11 +5218,11 @@ var tableV6 = objectType({
|
|
5158
5218
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5159
5219
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
5160
5220
|
}).strict();
|
5161
|
-
var
|
5221
|
+
var tableV7 = objectType({
|
5162
5222
|
name: stringType(),
|
5163
5223
|
schema: stringType(),
|
5164
|
-
columns: recordType(stringType(),
|
5165
|
-
indexes: recordType(stringType(),
|
5224
|
+
columns: recordType(stringType(), columnV7),
|
5225
|
+
indexes: recordType(stringType(), index2),
|
5166
5226
|
foreignKeys: recordType(stringType(), fk2),
|
5167
5227
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5168
5228
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
|
@@ -5246,12 +5306,27 @@ var pgSchemaExternal = objectType({
|
|
5246
5306
|
columns: recordType(stringType(), stringType())
|
5247
5307
|
})
|
5248
5308
|
}).strict();
|
5309
|
+
var pgSchemaInternalV7 = objectType({
|
5310
|
+
version: literalType("7"),
|
5311
|
+
dialect: literalType("postgresql"),
|
5312
|
+
tables: recordType(stringType(), tableV7),
|
5313
|
+
enums: recordType(stringType(), enumSchema),
|
5314
|
+
schemas: recordType(stringType(), stringType()),
|
5315
|
+
sequences: recordType(stringType(), sequenceSchema),
|
5316
|
+
_meta: objectType({
|
5317
|
+
schemas: recordType(stringType(), stringType()),
|
5318
|
+
tables: recordType(stringType(), stringType()),
|
5319
|
+
columns: recordType(stringType(), stringType())
|
5320
|
+
}),
|
5321
|
+
internal: kitInternals2
|
5322
|
+
}).strict();
|
5249
5323
|
var pgSchemaInternal = objectType({
|
5250
5324
|
version: literalType("7"),
|
5251
5325
|
dialect: literalType("postgresql"),
|
5252
5326
|
tables: recordType(stringType(), table2),
|
5253
5327
|
enums: recordType(stringType(), enumSchema),
|
5254
5328
|
schemas: recordType(stringType(), stringType()),
|
5329
|
+
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5255
5330
|
_meta: objectType({
|
5256
5331
|
schemas: recordType(stringType(), stringType()),
|
5257
5332
|
tables: recordType(stringType(), stringType()),
|
@@ -5262,7 +5337,7 @@ var pgSchemaInternal = objectType({
|
|
5262
5337
|
var tableSquashed2 = objectType({
|
5263
5338
|
name: stringType(),
|
5264
5339
|
schema: stringType(),
|
5265
|
-
columns: recordType(stringType(),
|
5340
|
+
columns: recordType(stringType(), columnSquashed),
|
5266
5341
|
indexes: recordType(stringType(), stringType()),
|
5267
5342
|
foreignKeys: recordType(stringType(), stringType()),
|
5268
5343
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
@@ -5294,12 +5369,14 @@ var pgSchemaSquashed = objectType({
|
|
5294
5369
|
dialect: literalType("postgresql"),
|
5295
5370
|
tables: recordType(stringType(), tableSquashed2),
|
5296
5371
|
enums: recordType(stringType(), enumSchema),
|
5297
|
-
schemas: recordType(stringType(), stringType())
|
5372
|
+
schemas: recordType(stringType(), stringType()),
|
5373
|
+
sequences: recordType(stringType(), sequenceSquashed)
|
5298
5374
|
}).strict();
|
5299
5375
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5300
5376
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
5301
5377
|
var pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
5302
5378
|
var pgSchemaV6 = pgSchemaInternalV6.merge(schemaHash2);
|
5379
|
+
var pgSchemaV7 = pgSchemaInternalV7.merge(schemaHash2);
|
5303
5380
|
var pgSchema = pgSchemaInternal.merge(schemaHash2);
|
5304
5381
|
var backwardCompatiblePgSchema = unionType([
|
5305
5382
|
pgSchemaV5,
|
@@ -5314,6 +5391,7 @@ var dryPg = pgSchema.parse({
|
|
5314
5391
|
tables: {},
|
5315
5392
|
enums: {},
|
5316
5393
|
schemas: {},
|
5394
|
+
sequences: {},
|
5317
5395
|
_meta: {
|
5318
5396
|
schemas: {},
|
5319
5397
|
tables: {},
|
@@ -5347,7 +5425,11 @@ var column3 = objectType({
|
|
5347
5425
|
primaryKey: booleanType(),
|
5348
5426
|
notNull: booleanType(),
|
5349
5427
|
autoincrement: booleanType().optional(),
|
5350
|
-
default: anyType().optional()
|
5428
|
+
default: anyType().optional(),
|
5429
|
+
generated: objectType({
|
5430
|
+
type: enumType(["stored", "virtual"]),
|
5431
|
+
as: stringType()
|
5432
|
+
}).optional()
|
5351
5433
|
}).strict();
|
5352
5434
|
var tableV33 = objectType({
|
5353
5435
|
name: stringType(),
|