drizzle-kit 0.28.1-ddb97ec → 0.29.0-0c27176

Sign up to get free protection for your applications and to get access to all the features.
package/utils.mjs CHANGED
@@ -876,30 +876,30 @@ var supports_color_default = supportsColor;
876
876
 
877
877
  // ../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
878
878
  function stringReplaceAll(string, substring, replacer) {
879
- let index4 = string.indexOf(substring);
880
- if (index4 === -1) {
879
+ let index5 = string.indexOf(substring);
880
+ if (index5 === -1) {
881
881
  return string;
882
882
  }
883
883
  const substringLength = substring.length;
884
884
  let endIndex = 0;
885
885
  let returnValue = "";
886
886
  do {
887
- returnValue += string.slice(endIndex, index4) + substring + replacer;
888
- endIndex = index4 + substringLength;
889
- index4 = string.indexOf(substring, endIndex);
890
- } while (index4 !== -1);
887
+ returnValue += string.slice(endIndex, index5) + substring + replacer;
888
+ endIndex = index5 + substringLength;
889
+ index5 = string.indexOf(substring, endIndex);
890
+ } while (index5 !== -1);
891
891
  returnValue += string.slice(endIndex);
892
892
  return returnValue;
893
893
  }
894
- function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index4) {
894
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index5) {
895
895
  let endIndex = 0;
896
896
  let returnValue = "";
897
897
  do {
898
- const gotCR = string[index4 - 1] === "\r";
899
- returnValue += string.slice(endIndex, gotCR ? index4 - 1 : index4) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
900
- endIndex = index4 + 1;
901
- index4 = string.indexOf("\n", endIndex);
902
- } while (index4 !== -1);
898
+ const gotCR = string[index5 - 1] === "\r";
899
+ returnValue += string.slice(endIndex, gotCR ? index5 - 1 : index5) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
900
+ endIndex = index5 + 1;
901
+ index5 = string.indexOf("\n", endIndex);
902
+ } while (index5 !== -1);
903
903
  returnValue += string.slice(endIndex);
904
904
  return returnValue;
905
905
  }
@@ -3152,9 +3152,9 @@ var ZodArray = class _ZodArray extends ZodType {
3152
3152
  return this.min(1, message);
3153
3153
  }
3154
3154
  };
3155
- ZodArray.create = (schema3, params) => {
3155
+ ZodArray.create = (schema4, params) => {
3156
3156
  return new ZodArray({
3157
- type: schema3,
3157
+ type: schema4,
3158
3158
  minLength: null,
3159
3159
  maxLength: null,
3160
3160
  exactLength: null,
@@ -3162,30 +3162,30 @@ ZodArray.create = (schema3, params) => {
3162
3162
  ...processCreateParams(params)
3163
3163
  });
3164
3164
  };
3165
- function deepPartialify(schema3) {
3166
- if (schema3 instanceof ZodObject) {
3165
+ function deepPartialify(schema4) {
3166
+ if (schema4 instanceof ZodObject) {
3167
3167
  const newShape = {};
3168
- for (const key in schema3.shape) {
3169
- const fieldSchema = schema3.shape[key];
3168
+ for (const key in schema4.shape) {
3169
+ const fieldSchema = schema4.shape[key];
3170
3170
  newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
3171
3171
  }
3172
3172
  return new ZodObject({
3173
- ...schema3._def,
3173
+ ...schema4._def,
3174
3174
  shape: () => newShape
3175
3175
  });
3176
- } else if (schema3 instanceof ZodArray) {
3176
+ } else if (schema4 instanceof ZodArray) {
3177
3177
  return new ZodArray({
3178
- ...schema3._def,
3179
- type: deepPartialify(schema3.element)
3178
+ ...schema4._def,
3179
+ type: deepPartialify(schema4.element)
3180
3180
  });
3181
- } else if (schema3 instanceof ZodOptional) {
3182
- return ZodOptional.create(deepPartialify(schema3.unwrap()));
3183
- } else if (schema3 instanceof ZodNullable) {
3184
- return ZodNullable.create(deepPartialify(schema3.unwrap()));
3185
- } else if (schema3 instanceof ZodTuple) {
3186
- return ZodTuple.create(schema3.items.map((item) => deepPartialify(item)));
3181
+ } else if (schema4 instanceof ZodOptional) {
3182
+ return ZodOptional.create(deepPartialify(schema4.unwrap()));
3183
+ } else if (schema4 instanceof ZodNullable) {
3184
+ return ZodNullable.create(deepPartialify(schema4.unwrap()));
3185
+ } else if (schema4 instanceof ZodTuple) {
3186
+ return ZodTuple.create(schema4.items.map((item) => deepPartialify(item)));
3187
3187
  } else {
3188
- return schema3;
3188
+ return schema4;
3189
3189
  }
3190
3190
  }
3191
3191
  var ZodObject = class _ZodObject extends ZodType {
@@ -3402,8 +3402,8 @@ var ZodObject = class _ZodObject extends ZodType {
3402
3402
  // }) as any;
3403
3403
  // return merged;
3404
3404
  // }
3405
- setKey(key, schema3) {
3406
- return this.augment({ [key]: schema3 });
3405
+ setKey(key, schema4) {
3406
+ return this.augment({ [key]: schema4 });
3407
3407
  }
3408
3408
  // merge<Incoming extends AnyZodObject>(
3409
3409
  // merging: Incoming
@@ -3426,10 +3426,10 @@ var ZodObject = class _ZodObject extends ZodType {
3426
3426
  // }) as any;
3427
3427
  // return merged;
3428
3428
  // }
3429
- catchall(index4) {
3429
+ catchall(index5) {
3430
3430
  return new _ZodObject({
3431
3431
  ...this._def,
3432
- catchall: index4
3432
+ catchall: index5
3433
3433
  });
3434
3434
  }
3435
3435
  pick(mask) {
@@ -3747,9 +3747,9 @@ function mergeValues(a, b) {
3747
3747
  return { valid: false };
3748
3748
  }
3749
3749
  const newArray = [];
3750
- for (let index4 = 0; index4 < a.length; index4++) {
3751
- const itemA = a[index4];
3752
- const itemB = b[index4];
3750
+ for (let index5 = 0; index5 < a.length; index5++) {
3751
+ const itemA = a[index5];
3752
+ const itemB = b[index5];
3753
3753
  const sharedValue = mergeValues(itemA, itemB);
3754
3754
  if (!sharedValue.valid) {
3755
3755
  return { valid: false };
@@ -3849,10 +3849,10 @@ var ZodTuple = class _ZodTuple extends ZodType {
3849
3849
  status.dirty();
3850
3850
  }
3851
3851
  const items = [...ctx.data].map((item, itemIndex) => {
3852
- const schema3 = this._def.items[itemIndex] || this._def.rest;
3853
- if (!schema3)
3852
+ const schema4 = this._def.items[itemIndex] || this._def.rest;
3853
+ if (!schema4)
3854
3854
  return null;
3855
- return schema3._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
3855
+ return schema4._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
3856
3856
  }).filter((x) => !!x);
3857
3857
  if (ctx.common.async) {
3858
3858
  return Promise.all(items).then((results) => {
@@ -3955,10 +3955,10 @@ var ZodMap = class extends ZodType {
3955
3955
  }
3956
3956
  const keyType = this._def.keyType;
3957
3957
  const valueType = this._def.valueType;
3958
- const pairs = [...ctx.data.entries()].map(([key, value], index4) => {
3958
+ const pairs = [...ctx.data.entries()].map(([key, value], index5) => {
3959
3959
  return {
3960
- key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index4, "key"])),
3961
- value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index4, "value"]))
3960
+ key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index5, "key"])),
3961
+ value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index5, "value"]))
3962
3962
  };
3963
3963
  });
3964
3964
  if (ctx.common.async) {
@@ -4386,9 +4386,9 @@ var ZodPromise = class extends ZodType {
4386
4386
  }));
4387
4387
  }
4388
4388
  };
4389
- ZodPromise.create = (schema3, params) => {
4389
+ ZodPromise.create = (schema4, params) => {
4390
4390
  return new ZodPromise({
4391
- type: schema3,
4391
+ type: schema4,
4392
4392
  typeName: ZodFirstPartyTypeKind.ZodPromise,
4393
4393
  ...processCreateParams(params)
4394
4394
  });
@@ -4513,17 +4513,17 @@ var ZodEffects = class extends ZodType {
4513
4513
  util.assertNever(effect);
4514
4514
  }
4515
4515
  };
4516
- ZodEffects.create = (schema3, effect, params) => {
4516
+ ZodEffects.create = (schema4, effect, params) => {
4517
4517
  return new ZodEffects({
4518
- schema: schema3,
4518
+ schema: schema4,
4519
4519
  typeName: ZodFirstPartyTypeKind.ZodEffects,
4520
4520
  effect,
4521
4521
  ...processCreateParams(params)
4522
4522
  });
4523
4523
  };
4524
- ZodEffects.createWithPreprocess = (preprocess, schema3, params) => {
4524
+ ZodEffects.createWithPreprocess = (preprocess, schema4, params) => {
4525
4525
  return new ZodEffects({
4526
- schema: schema3,
4526
+ schema: schema4,
4527
4527
  effect: { type: "preprocess", transform: preprocess },
4528
4528
  typeName: ZodFirstPartyTypeKind.ZodEffects,
4529
4529
  ...processCreateParams(params)
@@ -5497,8 +5497,117 @@ var dryPg = pgSchema.parse({
5497
5497
  }
5498
5498
  });
5499
5499
 
5500
- // src/serializer/sqliteSchema.ts
5500
+ // src/serializer/singlestoreSchema.ts
5501
5501
  var index3 = objectType({
5502
+ name: stringType(),
5503
+ columns: stringType().array(),
5504
+ isUnique: booleanType(),
5505
+ using: enumType(["btree", "hash"]).optional(),
5506
+ algorithm: enumType(["default", "inplace", "copy"]).optional(),
5507
+ lock: enumType(["default", "none", "shared", "exclusive"]).optional()
5508
+ }).strict();
5509
+ var column3 = objectType({
5510
+ name: stringType(),
5511
+ type: stringType(),
5512
+ primaryKey: booleanType(),
5513
+ notNull: booleanType(),
5514
+ autoincrement: booleanType().optional(),
5515
+ default: anyType().optional(),
5516
+ onUpdate: anyType().optional(),
5517
+ generated: objectType({
5518
+ type: enumType(["stored", "virtual"]),
5519
+ as: stringType()
5520
+ }).optional()
5521
+ }).strict();
5522
+ var compositePK3 = objectType({
5523
+ name: stringType(),
5524
+ columns: stringType().array()
5525
+ }).strict();
5526
+ var uniqueConstraint3 = objectType({
5527
+ name: stringType(),
5528
+ columns: stringType().array()
5529
+ }).strict();
5530
+ var table3 = objectType({
5531
+ name: stringType(),
5532
+ columns: recordType(stringType(), column3),
5533
+ indexes: recordType(stringType(), index3),
5534
+ compositePrimaryKeys: recordType(stringType(), compositePK3),
5535
+ uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
5536
+ }).strict();
5537
+ var viewMeta2 = objectType({
5538
+ algorithm: enumType(["undefined", "merge", "temptable"]),
5539
+ sqlSecurity: enumType(["definer", "invoker"]),
5540
+ withCheckOption: enumType(["local", "cascaded"]).optional()
5541
+ }).strict();
5542
+ var kitInternals3 = objectType({
5543
+ tables: recordType(
5544
+ stringType(),
5545
+ objectType({
5546
+ columns: recordType(
5547
+ stringType(),
5548
+ objectType({ isDefaultAnExpression: booleanType().optional() }).optional()
5549
+ )
5550
+ }).optional()
5551
+ ).optional(),
5552
+ indexes: recordType(
5553
+ stringType(),
5554
+ objectType({
5555
+ columns: recordType(
5556
+ stringType(),
5557
+ objectType({ isExpression: booleanType().optional() }).optional()
5558
+ )
5559
+ }).optional()
5560
+ ).optional()
5561
+ }).optional();
5562
+ var dialect2 = literalType("singlestore");
5563
+ var schemaHash3 = objectType({
5564
+ id: stringType(),
5565
+ prevId: stringType()
5566
+ });
5567
+ var schemaInternal2 = objectType({
5568
+ version: literalType("1"),
5569
+ dialect: dialect2,
5570
+ tables: recordType(stringType(), table3),
5571
+ /* views: record(string(), view).default({}), */
5572
+ _meta: objectType({
5573
+ tables: recordType(stringType(), stringType()),
5574
+ columns: recordType(stringType(), stringType())
5575
+ }),
5576
+ internal: kitInternals3
5577
+ }).strict();
5578
+ var schema2 = schemaInternal2.merge(schemaHash3);
5579
+ var tableSquashed3 = objectType({
5580
+ name: stringType(),
5581
+ columns: recordType(stringType(), column3),
5582
+ indexes: recordType(stringType(), stringType()),
5583
+ compositePrimaryKeys: recordType(stringType(), stringType()),
5584
+ uniqueConstraints: recordType(stringType(), stringType()).default({})
5585
+ }).strict();
5586
+ var schemaSquashed2 = objectType({
5587
+ version: literalType("1"),
5588
+ dialect: dialect2,
5589
+ tables: recordType(stringType(), tableSquashed3)
5590
+ /* views: record(string(), viewSquashed), */
5591
+ }).strict();
5592
+ var singlestoreSchema = schema2;
5593
+ var backwardCompatibleSingleStoreSchema = unionType([singlestoreSchema, schema2]);
5594
+ var drySingleStore = singlestoreSchema.parse({
5595
+ version: "1",
5596
+ dialect: "singlestore",
5597
+ id: originUUID,
5598
+ prevId: "",
5599
+ tables: {},
5600
+ schemas: {},
5601
+ /* views: {}, */
5602
+ _meta: {
5603
+ schemas: {},
5604
+ tables: {},
5605
+ columns: {}
5606
+ }
5607
+ });
5608
+
5609
+ // src/serializer/sqliteSchema.ts
5610
+ var index4 = objectType({
5502
5611
  name: stringType(),
5503
5612
  columns: stringType().array(),
5504
5613
  where: stringType().optional(),
@@ -5513,11 +5622,11 @@ var fk3 = objectType({
5513
5622
  onUpdate: stringType().optional(),
5514
5623
  onDelete: stringType().optional()
5515
5624
  }).strict();
5516
- var compositePK3 = objectType({
5625
+ var compositePK4 = objectType({
5517
5626
  columns: stringType().array(),
5518
5627
  name: stringType().optional()
5519
5628
  }).strict();
5520
- var column3 = objectType({
5629
+ var column4 = objectType({
5521
5630
  name: stringType(),
5522
5631
  type: stringType(),
5523
5632
  primaryKey: booleanType(),
@@ -5531,11 +5640,11 @@ var column3 = objectType({
5531
5640
  }).strict();
5532
5641
  var tableV33 = objectType({
5533
5642
  name: stringType(),
5534
- columns: recordType(stringType(), column3),
5535
- indexes: recordType(stringType(), index3),
5643
+ columns: recordType(stringType(), column4),
5644
+ indexes: recordType(stringType(), index4),
5536
5645
  foreignKeys: recordType(stringType(), fk3)
5537
5646
  }).strict();
5538
- var uniqueConstraint3 = objectType({
5647
+ var uniqueConstraint4 = objectType({
5539
5648
  name: stringType(),
5540
5649
  columns: stringType().array()
5541
5650
  }).strict();
@@ -5543,50 +5652,50 @@ var checkConstraint3 = objectType({
5543
5652
  name: stringType(),
5544
5653
  value: stringType()
5545
5654
  }).strict();
5546
- var table3 = objectType({
5655
+ var table4 = objectType({
5547
5656
  name: stringType(),
5548
- columns: recordType(stringType(), column3),
5549
- indexes: recordType(stringType(), index3),
5657
+ columns: recordType(stringType(), column4),
5658
+ indexes: recordType(stringType(), index4),
5550
5659
  foreignKeys: recordType(stringType(), fk3),
5551
- compositePrimaryKeys: recordType(stringType(), compositePK3),
5552
- uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({}),
5660
+ compositePrimaryKeys: recordType(stringType(), compositePK4),
5661
+ uniqueConstraints: recordType(stringType(), uniqueConstraint4).default({}),
5553
5662
  checkConstraints: recordType(stringType(), checkConstraint3).default({})
5554
5663
  }).strict();
5555
5664
  var view3 = objectType({
5556
5665
  name: stringType(),
5557
- columns: recordType(stringType(), column3),
5666
+ columns: recordType(stringType(), column4),
5558
5667
  definition: stringType().optional(),
5559
5668
  isExisting: booleanType()
5560
5669
  }).strict();
5561
- var dialect2 = enumType(["sqlite"]);
5562
- var schemaHash3 = objectType({
5670
+ var dialect3 = enumType(["sqlite"]);
5671
+ var schemaHash4 = objectType({
5563
5672
  id: stringType(),
5564
5673
  prevId: stringType()
5565
5674
  }).strict();
5566
5675
  var schemaInternalV32 = objectType({
5567
5676
  version: literalType("3"),
5568
- dialect: dialect2,
5677
+ dialect: dialect3,
5569
5678
  tables: recordType(stringType(), tableV33),
5570
5679
  enums: objectType({})
5571
5680
  }).strict();
5572
5681
  var schemaInternalV42 = objectType({
5573
5682
  version: literalType("4"),
5574
- dialect: dialect2,
5575
- tables: recordType(stringType(), table3),
5683
+ dialect: dialect3,
5684
+ tables: recordType(stringType(), table4),
5576
5685
  views: recordType(stringType(), view3).default({}),
5577
5686
  enums: objectType({})
5578
5687
  }).strict();
5579
5688
  var schemaInternalV52 = objectType({
5580
5689
  version: literalType("5"),
5581
- dialect: dialect2,
5582
- tables: recordType(stringType(), table3),
5690
+ dialect: dialect3,
5691
+ tables: recordType(stringType(), table4),
5583
5692
  enums: objectType({}),
5584
5693
  _meta: objectType({
5585
5694
  tables: recordType(stringType(), stringType()),
5586
5695
  columns: recordType(stringType(), stringType())
5587
5696
  })
5588
5697
  }).strict();
5589
- var kitInternals3 = objectType({
5698
+ var kitInternals4 = objectType({
5590
5699
  indexes: recordType(
5591
5700
  stringType(),
5592
5701
  objectType({
@@ -5598,39 +5707,39 @@ var kitInternals3 = objectType({
5598
5707
  ).optional()
5599
5708
  }).optional();
5600
5709
  var latestVersion = literalType("6");
5601
- var schemaInternal2 = objectType({
5710
+ var schemaInternal3 = objectType({
5602
5711
  version: latestVersion,
5603
- dialect: dialect2,
5604
- tables: recordType(stringType(), table3),
5712
+ dialect: dialect3,
5713
+ tables: recordType(stringType(), table4),
5605
5714
  views: recordType(stringType(), view3).default({}),
5606
5715
  enums: objectType({}),
5607
5716
  _meta: objectType({
5608
5717
  tables: recordType(stringType(), stringType()),
5609
5718
  columns: recordType(stringType(), stringType())
5610
5719
  }),
5611
- internal: kitInternals3
5720
+ internal: kitInternals4
5612
5721
  }).strict();
5613
- var schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
5614
- var schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
5615
- var schemaV52 = schemaInternalV52.merge(schemaHash3).strict();
5616
- var schema2 = schemaInternal2.merge(schemaHash3).strict();
5617
- var tableSquashed3 = objectType({
5722
+ var schemaV32 = schemaInternalV32.merge(schemaHash4).strict();
5723
+ var schemaV42 = schemaInternalV42.merge(schemaHash4).strict();
5724
+ var schemaV52 = schemaInternalV52.merge(schemaHash4).strict();
5725
+ var schema3 = schemaInternal3.merge(schemaHash4).strict();
5726
+ var tableSquashed4 = objectType({
5618
5727
  name: stringType(),
5619
- columns: recordType(stringType(), column3),
5728
+ columns: recordType(stringType(), column4),
5620
5729
  indexes: recordType(stringType(), stringType()),
5621
5730
  foreignKeys: recordType(stringType(), stringType()),
5622
5731
  compositePrimaryKeys: recordType(stringType(), stringType()),
5623
5732
  uniqueConstraints: recordType(stringType(), stringType()).default({}),
5624
5733
  checkConstraints: recordType(stringType(), stringType()).default({})
5625
5734
  }).strict();
5626
- var schemaSquashed2 = objectType({
5735
+ var schemaSquashed3 = objectType({
5627
5736
  version: latestVersion,
5628
- dialect: dialect2,
5629
- tables: recordType(stringType(), tableSquashed3),
5737
+ dialect: dialect3,
5738
+ tables: recordType(stringType(), tableSquashed4),
5630
5739
  views: recordType(stringType(), view3),
5631
5740
  enums: anyType()
5632
5741
  }).strict();
5633
- var drySQLite = schema2.parse({
5742
+ var drySQLite = schema3.parse({
5634
5743
  version: "6",
5635
5744
  dialect: "sqlite",
5636
5745
  id: originUUID,
@@ -5644,7 +5753,7 @@ var drySQLite = schema2.parse({
5644
5753
  }
5645
5754
  });
5646
5755
  var sqliteSchemaV5 = schemaV52;
5647
- var backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema2]);
5756
+ var backwardCompatibleSqliteSchema = unionType([sqliteSchemaV5, schema3]);
5648
5757
 
5649
5758
  // src/utils.ts
5650
5759
  var copy = (it) => {
@@ -5668,27 +5777,27 @@ var assertV1OutFolder = (out) => {
5668
5777
  process.exit(1);
5669
5778
  }
5670
5779
  };
5671
- var dryJournal = (dialect3) => {
5780
+ var dryJournal = (dialect4) => {
5672
5781
  return {
5673
5782
  version: snapshotVersion,
5674
- dialect: dialect3,
5783
+ dialect: dialect4,
5675
5784
  entries: []
5676
5785
  };
5677
5786
  };
5678
- var prepareOutFolder = (out, dialect3) => {
5787
+ var prepareOutFolder = (out, dialect4) => {
5679
5788
  const meta = join(out, "meta");
5680
5789
  const journalPath = join(meta, "_journal.json");
5681
5790
  if (!existsSync(join(out, "meta"))) {
5682
5791
  mkdirSync(meta, { recursive: true });
5683
- writeFileSync(journalPath, JSON.stringify(dryJournal(dialect3)));
5792
+ writeFileSync(journalPath, JSON.stringify(dryJournal(dialect4)));
5684
5793
  }
5685
5794
  const journal = JSON.parse(readFileSync(journalPath).toString());
5686
5795
  const snapshots = readdirSync(meta).filter((it) => !it.startsWith("_")).map((it) => join(meta, it));
5687
5796
  snapshots.sort();
5688
5797
  return { meta, snapshots, journal };
5689
5798
  };
5690
- var validatorForDialect = (dialect3) => {
5691
- switch (dialect3) {
5799
+ var validatorForDialect = (dialect4) => {
5800
+ switch (dialect4) {
5692
5801
  case "postgresql":
5693
5802
  return { validator: backwardCompatiblePgSchema, version: 7 };
5694
5803
  case "sqlite":
@@ -5697,10 +5806,12 @@ var validatorForDialect = (dialect3) => {
5697
5806
  return { validator: backwardCompatibleSqliteSchema, version: 6 };
5698
5807
  case "mysql":
5699
5808
  return { validator: backwardCompatibleMysqlSchema, version: 5 };
5809
+ case "singlestore":
5810
+ return { validator: backwardCompatibleSingleStoreSchema, version: 1 };
5700
5811
  }
5701
5812
  };
5702
- var validateWithReport = (snapshots, dialect3) => {
5703
- const { validator, version } = validatorForDialect(dialect3);
5813
+ var validateWithReport = (snapshots, dialect4) => {
5814
+ const { validator, version } = validatorForDialect(dialect4);
5704
5815
  const result = snapshots.reduce(
5705
5816
  (accum, it) => {
5706
5817
  const raw = JSON.parse(readFileSync(`./${it}`).toString());
@@ -5741,9 +5852,9 @@ var validateWithReport = (snapshots, dialect3) => {
5741
5852
  );
5742
5853
  return result;
5743
5854
  };
5744
- var prepareMigrationFolder = (outFolder = "drizzle", dialect3) => {
5745
- const { snapshots, journal } = prepareOutFolder(outFolder, dialect3);
5746
- const report = validateWithReport(snapshots, dialect3);
5855
+ var prepareMigrationFolder = (outFolder = "drizzle", dialect4) => {
5856
+ const { snapshots, journal } = prepareOutFolder(outFolder, dialect4);
5857
+ const report = validateWithReport(snapshots, dialect4);
5747
5858
  if (report.nonLatest.length > 0) {
5748
5859
  console.log(
5749
5860
  report.nonLatest.map((it) => {
@@ -5806,8 +5917,8 @@ var tableRenameKey = (it) => {
5806
5917
  const out = it.schema ? `"${it.schema}"."${it.name}"` : `"${it.name}"`;
5807
5918
  return out;
5808
5919
  };
5809
- var columnRenameKey = (table4, schema3, column4) => {
5810
- const out = schema3 ? `"${schema3}"."${table4}"."${column4}"` : `"${table4}"."${column4}"`;
5920
+ var columnRenameKey = (table5, schema4, column5) => {
5921
+ const out = schema4 ? `"${schema4}"."${table5}"."${column5}"` : `"${table5}"."${column5}"`;
5811
5922
  return out;
5812
5923
  };
5813
5924
  var kloudMeta = () => {