drizzle-kit 0.25.0-05b9e35 → 0.25.0-06c725b

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.
Files changed (8) hide show
  1. package/api.d.mts +82 -474
  2. package/api.d.ts +82 -474
  3. package/api.js +16085 -95988
  4. package/api.mjs +16084 -95983
  5. package/bin.cjs +843 -1198
  6. package/package.json +1 -1
  7. package/utils.js +35 -57
  8. package/utils.mjs +35 -57
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.25.0-05b9e35",
3
+ "version": "0.25.0-06c725b",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
package/utils.js CHANGED
@@ -409,8 +409,8 @@ var require_hanji = __commonJS({
409
409
  };
410
410
  exports2.deferred = deferred;
411
411
  var Terminal = class {
412
- constructor(view2, stdin, stdout, closable) {
413
- this.view = view2;
412
+ constructor(view, stdin, stdout, closable) {
413
+ this.view = view;
414
414
  this.stdin = stdin;
415
415
  this.stdout = stdout;
416
416
  this.closable = closable;
@@ -448,7 +448,7 @@ var require_hanji = __commonJS({
448
448
  this.resolve({ status: "submitted", data: this.view.result() });
449
449
  return;
450
450
  }
451
- view2.input(str, key);
451
+ view.input(str, key);
452
452
  };
453
453
  this.stdin.on("keypress", keypress);
454
454
  this.view.attach(this);
@@ -510,8 +510,8 @@ var require_hanji = __commonJS({
510
510
  };
511
511
  exports2.TaskView = TaskView2;
512
512
  var TaskTerminal = class {
513
- constructor(view2, stdout) {
514
- this.view = view2;
513
+ constructor(view, stdout) {
514
+ this.view = view;
515
515
  this.stdout = stdout;
516
516
  this.text = "";
517
517
  this.view.attach(this);
@@ -530,22 +530,22 @@ var require_hanji = __commonJS({
530
530
  }
531
531
  };
532
532
  exports2.TaskTerminal = TaskTerminal;
533
- function render2(view2) {
533
+ function render2(view) {
534
534
  const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
535
- if (view2 instanceof Prompt2) {
536
- const terminal = new Terminal(view2, stdin, stdout, closable);
535
+ if (view instanceof Prompt2) {
536
+ const terminal = new Terminal(view, stdin, stdout, closable);
537
537
  terminal.requestLayout();
538
538
  return terminal.result();
539
539
  }
540
- stdout.write(`${view2}
540
+ stdout.write(`${view}
541
541
  `);
542
542
  closable.close();
543
543
  return;
544
544
  }
545
545
  exports2.render = render2;
546
- function renderWithTask(view2, task) {
546
+ function renderWithTask(view, task) {
547
547
  return __awaiter(this, void 0, void 0, function* () {
548
- const terminal = new TaskTerminal(view2, process.stdout);
548
+ const terminal = new TaskTerminal(view, process.stdout);
549
549
  terminal.requestLayout();
550
550
  const result = yield task;
551
551
  terminal.clear();
@@ -4901,6 +4901,10 @@ var uniqueConstraint = objectType({
4901
4901
  name: stringType(),
4902
4902
  columns: stringType().array()
4903
4903
  }).strict();
4904
+ var checkConstraint = objectType({
4905
+ name: stringType(),
4906
+ value: stringType()
4907
+ }).strict();
4904
4908
  var tableV4 = objectType({
4905
4909
  name: stringType(),
4906
4910
  schema: stringType().optional(),
@@ -4914,7 +4918,8 @@ var table = objectType({
4914
4918
  indexes: recordType(stringType(), index),
4915
4919
  foreignKeys: recordType(stringType(), fk),
4916
4920
  compositePrimaryKeys: recordType(stringType(), compositePK),
4917
- uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
4921
+ uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
4922
+ checkConstraint: recordType(stringType(), checkConstraint).default({})
4918
4923
  }).strict();
4919
4924
  var kitInternals = objectType({
4920
4925
  tables: recordType(
@@ -4991,7 +4996,8 @@ var tableSquashed = objectType({
4991
4996
  indexes: recordType(stringType(), stringType()),
4992
4997
  foreignKeys: recordType(stringType(), stringType()),
4993
4998
  compositePrimaryKeys: recordType(stringType(), stringType()),
4994
- uniqueConstraints: recordType(stringType(), stringType()).default({})
4999
+ uniqueConstraints: recordType(stringType(), stringType()).default({}),
5000
+ checkConstraints: recordType(stringType(), stringType()).default({})
4995
5001
  }).strict();
4996
5002
  var schemaSquashed = objectType({
4997
5003
  version: literalType("5"),
@@ -5179,6 +5185,10 @@ var column2 = objectType({
5179
5185
  }).optional(),
5180
5186
  identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
5181
5187
  }).strict();
5188
+ var checkConstraint2 = objectType({
5189
+ name: stringType(),
5190
+ value: stringType()
5191
+ }).strict();
5182
5192
  var columnSquashed = objectType({
5183
5193
  name: stringType(),
5184
5194
  type: stringType(),
@@ -5210,44 +5220,6 @@ var uniqueConstraint2 = objectType({
5210
5220
  columns: stringType().array(),
5211
5221
  nullsNotDistinct: booleanType()
5212
5222
  }).strict();
5213
- var viewWithOption = objectType({
5214
- checkOption: enumType(["local", "cascaded"]).optional(),
5215
- securityBarrier: booleanType().optional(),
5216
- securityInvoker: booleanType().optional()
5217
- }).strict();
5218
- var matViewWithOption = objectType({
5219
- fillfactor: numberType().optional(),
5220
- toastTupleTarget: numberType().optional(),
5221
- parallelWorkers: numberType().optional(),
5222
- autovacuumEnabled: booleanType().optional(),
5223
- vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
5224
- vacuumTruncate: booleanType().optional(),
5225
- autovacuumVacuumThreshold: numberType().optional(),
5226
- autovacuumVacuumScaleFactor: numberType().optional(),
5227
- autovacuumVacuumCostDelay: numberType().optional(),
5228
- autovacuumVacuumCostLimit: numberType().optional(),
5229
- autovacuumFreezeMinAge: numberType().optional(),
5230
- autovacuumFreezeMaxAge: numberType().optional(),
5231
- autovacuumFreezeTableAge: numberType().optional(),
5232
- autovacuumMultixactFreezeMinAge: numberType().optional(),
5233
- autovacuumMultixactFreezeMaxAge: numberType().optional(),
5234
- autovacuumMultixactFreezeTableAge: numberType().optional(),
5235
- logAutovacuumMinDuration: numberType().optional(),
5236
- userCatalogTable: booleanType().optional()
5237
- }).strict();
5238
- var mergedViewWithOption = viewWithOption.merge(matViewWithOption);
5239
- var view = objectType({
5240
- name: stringType(),
5241
- schema: stringType(),
5242
- columns: recordType(stringType(), column2),
5243
- definition: stringType().optional(),
5244
- materialized: booleanType(),
5245
- with: mergedViewWithOption.optional(),
5246
- isExisting: booleanType(),
5247
- withNoData: booleanType().optional(),
5248
- using: stringType().optional(),
5249
- tablespace: stringType().optional()
5250
- }).strict();
5251
5223
  var tableV42 = objectType({
5252
5224
  name: stringType(),
5253
5225
  schema: stringType(),
@@ -5289,7 +5261,8 @@ var table2 = objectType({
5289
5261
  indexes: recordType(stringType(), index2),
5290
5262
  foreignKeys: recordType(stringType(), fk2),
5291
5263
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5292
- uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
5264
+ uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5265
+ checkConstraints: recordType(stringType(), checkConstraint2).default({})
5293
5266
  }).strict();
5294
5267
  var schemaHash2 = objectType({
5295
5268
  id: stringType(),
@@ -5382,7 +5355,6 @@ var pgSchemaInternal = objectType({
5382
5355
  tables: recordType(stringType(), table2),
5383
5356
  enums: recordType(stringType(), enumSchema),
5384
5357
  schemas: recordType(stringType(), stringType()),
5385
- views: recordType(stringType(), view).default({}),
5386
5358
  sequences: recordType(stringType(), sequenceSchema).default({}),
5387
5359
  _meta: objectType({
5388
5360
  schemas: recordType(stringType(), stringType()),
@@ -5398,7 +5370,8 @@ var tableSquashed2 = objectType({
5398
5370
  indexes: recordType(stringType(), stringType()),
5399
5371
  foreignKeys: recordType(stringType(), stringType()),
5400
5372
  compositePrimaryKeys: recordType(stringType(), stringType()),
5401
- uniqueConstraints: recordType(stringType(), stringType())
5373
+ uniqueConstraints: recordType(stringType(), stringType()),
5374
+ checkConstraints: recordType(stringType(), stringType())
5402
5375
  }).strict();
5403
5376
  var tableSquashedV42 = objectType({
5404
5377
  name: stringType(),
@@ -5427,7 +5400,6 @@ var pgSchemaSquashed = objectType({
5427
5400
  tables: recordType(stringType(), tableSquashed2),
5428
5401
  enums: recordType(stringType(), enumSchema),
5429
5402
  schemas: recordType(stringType(), stringType()),
5430
- views: recordType(stringType(), view),
5431
5403
  sequences: recordType(stringType(), sequenceSquashed)
5432
5404
  }).strict();
5433
5405
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
@@ -5499,13 +5471,18 @@ var uniqueConstraint3 = objectType({
5499
5471
  name: stringType(),
5500
5472
  columns: stringType().array()
5501
5473
  }).strict();
5474
+ var checkConstraint3 = objectType({
5475
+ name: stringType(),
5476
+ value: stringType()
5477
+ }).strict();
5502
5478
  var table3 = objectType({
5503
5479
  name: stringType(),
5504
5480
  columns: recordType(stringType(), column3),
5505
5481
  indexes: recordType(stringType(), index3),
5506
5482
  foreignKeys: recordType(stringType(), fk3),
5507
5483
  compositePrimaryKeys: recordType(stringType(), compositePK3),
5508
- uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
5484
+ uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
5485
+ checkConstraints: recordType(stringType(), checkConstraint3).default({})
5509
5486
  }).strict();
5510
5487
  var dialect2 = enumType(["sqlite"]);
5511
5488
  var schemaHash3 = objectType({
@@ -5567,7 +5544,8 @@ var tableSquashed3 = objectType({
5567
5544
  indexes: recordType(stringType(), stringType()),
5568
5545
  foreignKeys: recordType(stringType(), stringType()),
5569
5546
  compositePrimaryKeys: recordType(stringType(), stringType()),
5570
- uniqueConstraints: recordType(stringType(), stringType()).default({})
5547
+ uniqueConstraints: recordType(stringType(), stringType()).default({}),
5548
+ checkConstraints: recordType(stringType(), stringType()).default({})
5571
5549
  }).strict();
5572
5550
  var schemaSquashed2 = objectType({
5573
5551
  version: latestVersion,
package/utils.mjs CHANGED
@@ -410,8 +410,8 @@ var require_hanji = __commonJS({
410
410
  };
411
411
  exports.deferred = deferred;
412
412
  var Terminal = class {
413
- constructor(view2, stdin, stdout, closable) {
414
- this.view = view2;
413
+ constructor(view, stdin, stdout, closable) {
414
+ this.view = view;
415
415
  this.stdin = stdin;
416
416
  this.stdout = stdout;
417
417
  this.closable = closable;
@@ -449,7 +449,7 @@ var require_hanji = __commonJS({
449
449
  this.resolve({ status: "submitted", data: this.view.result() });
450
450
  return;
451
451
  }
452
- view2.input(str, key);
452
+ view.input(str, key);
453
453
  };
454
454
  this.stdin.on("keypress", keypress);
455
455
  this.view.attach(this);
@@ -511,8 +511,8 @@ var require_hanji = __commonJS({
511
511
  };
512
512
  exports.TaskView = TaskView2;
513
513
  var TaskTerminal = class {
514
- constructor(view2, stdout) {
515
- this.view = view2;
514
+ constructor(view, stdout) {
515
+ this.view = view;
516
516
  this.stdout = stdout;
517
517
  this.text = "";
518
518
  this.view.attach(this);
@@ -531,22 +531,22 @@ var require_hanji = __commonJS({
531
531
  }
532
532
  };
533
533
  exports.TaskTerminal = TaskTerminal;
534
- function render2(view2) {
534
+ function render2(view) {
535
535
  const { stdin, stdout, closable } = (0, readline_1.prepareReadLine)();
536
- if (view2 instanceof Prompt2) {
537
- const terminal = new Terminal(view2, stdin, stdout, closable);
536
+ if (view instanceof Prompt2) {
537
+ const terminal = new Terminal(view, stdin, stdout, closable);
538
538
  terminal.requestLayout();
539
539
  return terminal.result();
540
540
  }
541
- stdout.write(`${view2}
541
+ stdout.write(`${view}
542
542
  `);
543
543
  closable.close();
544
544
  return;
545
545
  }
546
546
  exports.render = render2;
547
- function renderWithTask(view2, task) {
547
+ function renderWithTask(view, task) {
548
548
  return __awaiter(this, void 0, void 0, function* () {
549
- const terminal = new TaskTerminal(view2, process.stdout);
549
+ const terminal = new TaskTerminal(view, process.stdout);
550
550
  terminal.requestLayout();
551
551
  const result = yield task;
552
552
  terminal.clear();
@@ -4880,6 +4880,10 @@ var uniqueConstraint = objectType({
4880
4880
  name: stringType(),
4881
4881
  columns: stringType().array()
4882
4882
  }).strict();
4883
+ var checkConstraint = objectType({
4884
+ name: stringType(),
4885
+ value: stringType()
4886
+ }).strict();
4883
4887
  var tableV4 = objectType({
4884
4888
  name: stringType(),
4885
4889
  schema: stringType().optional(),
@@ -4893,7 +4897,8 @@ var table = objectType({
4893
4897
  indexes: recordType(stringType(), index),
4894
4898
  foreignKeys: recordType(stringType(), fk),
4895
4899
  compositePrimaryKeys: recordType(stringType(), compositePK),
4896
- uniqueConstraints: recordType(stringType(), uniqueConstraint).default({})
4900
+ uniqueConstraints: recordType(stringType(), uniqueConstraint).default({}),
4901
+ checkConstraint: recordType(stringType(), checkConstraint).default({})
4897
4902
  }).strict();
4898
4903
  var kitInternals = objectType({
4899
4904
  tables: recordType(
@@ -4970,7 +4975,8 @@ var tableSquashed = objectType({
4970
4975
  indexes: recordType(stringType(), stringType()),
4971
4976
  foreignKeys: recordType(stringType(), stringType()),
4972
4977
  compositePrimaryKeys: recordType(stringType(), stringType()),
4973
- uniqueConstraints: recordType(stringType(), stringType()).default({})
4978
+ uniqueConstraints: recordType(stringType(), stringType()).default({}),
4979
+ checkConstraints: recordType(stringType(), stringType()).default({})
4974
4980
  }).strict();
4975
4981
  var schemaSquashed = objectType({
4976
4982
  version: literalType("5"),
@@ -5158,6 +5164,10 @@ var column2 = objectType({
5158
5164
  }).optional(),
5159
5165
  identity: sequenceSchema.merge(objectType({ type: enumType(["always", "byDefault"]) })).optional()
5160
5166
  }).strict();
5167
+ var checkConstraint2 = objectType({
5168
+ name: stringType(),
5169
+ value: stringType()
5170
+ }).strict();
5161
5171
  var columnSquashed = objectType({
5162
5172
  name: stringType(),
5163
5173
  type: stringType(),
@@ -5189,44 +5199,6 @@ var uniqueConstraint2 = objectType({
5189
5199
  columns: stringType().array(),
5190
5200
  nullsNotDistinct: booleanType()
5191
5201
  }).strict();
5192
- var viewWithOption = objectType({
5193
- checkOption: enumType(["local", "cascaded"]).optional(),
5194
- securityBarrier: booleanType().optional(),
5195
- securityInvoker: booleanType().optional()
5196
- }).strict();
5197
- var matViewWithOption = objectType({
5198
- fillfactor: numberType().optional(),
5199
- toastTupleTarget: numberType().optional(),
5200
- parallelWorkers: numberType().optional(),
5201
- autovacuumEnabled: booleanType().optional(),
5202
- vacuumIndexCleanup: enumType(["auto", "off", "on"]).optional(),
5203
- vacuumTruncate: booleanType().optional(),
5204
- autovacuumVacuumThreshold: numberType().optional(),
5205
- autovacuumVacuumScaleFactor: numberType().optional(),
5206
- autovacuumVacuumCostDelay: numberType().optional(),
5207
- autovacuumVacuumCostLimit: numberType().optional(),
5208
- autovacuumFreezeMinAge: numberType().optional(),
5209
- autovacuumFreezeMaxAge: numberType().optional(),
5210
- autovacuumFreezeTableAge: numberType().optional(),
5211
- autovacuumMultixactFreezeMinAge: numberType().optional(),
5212
- autovacuumMultixactFreezeMaxAge: numberType().optional(),
5213
- autovacuumMultixactFreezeTableAge: numberType().optional(),
5214
- logAutovacuumMinDuration: numberType().optional(),
5215
- userCatalogTable: booleanType().optional()
5216
- }).strict();
5217
- var mergedViewWithOption = viewWithOption.merge(matViewWithOption);
5218
- var view = objectType({
5219
- name: stringType(),
5220
- schema: stringType(),
5221
- columns: recordType(stringType(), column2),
5222
- definition: stringType().optional(),
5223
- materialized: booleanType(),
5224
- with: mergedViewWithOption.optional(),
5225
- isExisting: booleanType(),
5226
- withNoData: booleanType().optional(),
5227
- using: stringType().optional(),
5228
- tablespace: stringType().optional()
5229
- }).strict();
5230
5202
  var tableV42 = objectType({
5231
5203
  name: stringType(),
5232
5204
  schema: stringType(),
@@ -5268,7 +5240,8 @@ var table2 = objectType({
5268
5240
  indexes: recordType(stringType(), index2),
5269
5241
  foreignKeys: recordType(stringType(), fk2),
5270
5242
  compositePrimaryKeys: recordType(stringType(), compositePK2),
5271
- uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({})
5243
+ uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
5244
+ checkConstraints: recordType(stringType(), checkConstraint2).default({})
5272
5245
  }).strict();
5273
5246
  var schemaHash2 = objectType({
5274
5247
  id: stringType(),
@@ -5361,7 +5334,6 @@ var pgSchemaInternal = objectType({
5361
5334
  tables: recordType(stringType(), table2),
5362
5335
  enums: recordType(stringType(), enumSchema),
5363
5336
  schemas: recordType(stringType(), stringType()),
5364
- views: recordType(stringType(), view).default({}),
5365
5337
  sequences: recordType(stringType(), sequenceSchema).default({}),
5366
5338
  _meta: objectType({
5367
5339
  schemas: recordType(stringType(), stringType()),
@@ -5377,7 +5349,8 @@ var tableSquashed2 = objectType({
5377
5349
  indexes: recordType(stringType(), stringType()),
5378
5350
  foreignKeys: recordType(stringType(), stringType()),
5379
5351
  compositePrimaryKeys: recordType(stringType(), stringType()),
5380
- uniqueConstraints: recordType(stringType(), stringType())
5352
+ uniqueConstraints: recordType(stringType(), stringType()),
5353
+ checkConstraints: recordType(stringType(), stringType())
5381
5354
  }).strict();
5382
5355
  var tableSquashedV42 = objectType({
5383
5356
  name: stringType(),
@@ -5406,7 +5379,6 @@ var pgSchemaSquashed = objectType({
5406
5379
  tables: recordType(stringType(), tableSquashed2),
5407
5380
  enums: recordType(stringType(), enumSchema),
5408
5381
  schemas: recordType(stringType(), stringType()),
5409
- views: recordType(stringType(), view),
5410
5382
  sequences: recordType(stringType(), sequenceSquashed)
5411
5383
  }).strict();
5412
5384
  var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
@@ -5478,13 +5450,18 @@ var uniqueConstraint3 = objectType({
5478
5450
  name: stringType(),
5479
5451
  columns: stringType().array()
5480
5452
  }).strict();
5453
+ var checkConstraint3 = objectType({
5454
+ name: stringType(),
5455
+ value: stringType()
5456
+ }).strict();
5481
5457
  var table3 = objectType({
5482
5458
  name: stringType(),
5483
5459
  columns: recordType(stringType(), column3),
5484
5460
  indexes: recordType(stringType(), index3),
5485
5461
  foreignKeys: recordType(stringType(), fk3),
5486
5462
  compositePrimaryKeys: recordType(stringType(), compositePK3),
5487
- uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
5463
+ uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
5464
+ checkConstraints: recordType(stringType(), checkConstraint3).default({})
5488
5465
  }).strict();
5489
5466
  var dialect2 = enumType(["sqlite"]);
5490
5467
  var schemaHash3 = objectType({
@@ -5546,7 +5523,8 @@ var tableSquashed3 = objectType({
5546
5523
  indexes: recordType(stringType(), stringType()),
5547
5524
  foreignKeys: recordType(stringType(), stringType()),
5548
5525
  compositePrimaryKeys: recordType(stringType(), stringType()),
5549
- uniqueConstraints: recordType(stringType(), stringType()).default({})
5526
+ uniqueConstraints: recordType(stringType(), stringType()).default({}),
5527
+ checkConstraints: recordType(stringType(), stringType()).default({})
5550
5528
  }).strict();
5551
5529
  var schemaSquashed2 = objectType({
5552
5530
  version: latestVersion,