drizzle-kit 0.23.2-6f27447 → 0.23.2-cd71182

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. package/api.js +16 -14
  2. package/api.mjs +16 -14
  3. package/bin.cjs +3 -2
  4. package/package.json +1 -1
package/api.js CHANGED
@@ -8714,14 +8714,14 @@ var require_heap = __commonJS({
8714
8714
  return item;
8715
8715
  };
8716
8716
  heapify = function(array, cmp) {
8717
- var i, _i2, _j, _len, _ref, _ref1, _results, _results1;
8717
+ var i, _i2, _j2, _len, _ref, _ref1, _results, _results1;
8718
8718
  if (cmp == null) {
8719
8719
  cmp = defaultCmp;
8720
8720
  }
8721
8721
  _ref1 = function() {
8722
8722
  _results1 = [];
8723
- for (var _j2 = 0, _ref2 = floor(array.length / 2); 0 <= _ref2 ? _j2 < _ref2 : _j2 > _ref2; 0 <= _ref2 ? _j2++ : _j2--) {
8724
- _results1.push(_j2);
8723
+ for (var _j3 = 0, _ref2 = floor(array.length / 2); 0 <= _ref2 ? _j3 < _ref2 : _j3 > _ref2; 0 <= _ref2 ? _j3++ : _j3--) {
8724
+ _results1.push(_j3);
8725
8725
  }
8726
8726
  return _results1;
8727
8727
  }.apply(this).reverse();
@@ -8762,7 +8762,7 @@ var require_heap = __commonJS({
8762
8762
  return result.sort(cmp).reverse();
8763
8763
  };
8764
8764
  nsmallest = function(array, n, cmp) {
8765
- var elem, i, los, result, _i2, _j, _len, _ref, _ref1, _results;
8765
+ var elem, i, los, result, _i2, _j2, _len, _ref, _ref1, _results;
8766
8766
  if (cmp == null) {
8767
8767
  cmp = defaultCmp;
8768
8768
  }
@@ -8785,7 +8785,7 @@ var require_heap = __commonJS({
8785
8785
  }
8786
8786
  heapify(array, cmp);
8787
8787
  _results = [];
8788
- for (i = _j = 0, _ref1 = min2(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
8788
+ for (i = _j2 = 0, _ref1 = min2(n, array.length); 0 <= _ref1 ? _j2 < _ref1 : _j2 > _ref1; i = 0 <= _ref1 ? ++_j2 : --_j2) {
8789
8789
  _results.push(heappop(array, cmp));
8790
8790
  }
8791
8791
  return _results;
@@ -17480,7 +17480,7 @@ function getTableName(table4) {
17480
17480
  function getTableUniqueName(table4) {
17481
17481
  return `${table4[Schema] ?? "public"}.${table4[TableName]}`;
17482
17482
  }
17483
- var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, Table2;
17483
+ var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, Table2;
17484
17484
  var init_table = __esm({
17485
17485
  "../drizzle-orm/dist/table.js"() {
17486
17486
  "use strict";
@@ -17494,32 +17494,34 @@ var init_table = __esm({
17494
17494
  IsAlias = Symbol.for("drizzle:IsAlias");
17495
17495
  ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
17496
17496
  IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");
17497
- _i = entityKind, _h = TableName, _g = OriginalName, _f = Schema, _e = Columns, _d = ExtraConfigColumns, _c = BaseName, _b = IsAlias, _a3 = ExtraConfigBuilder;
17497
+ _j = entityKind, _i = TableName, _h = OriginalName, _g = Schema, _f = Columns, _e = ExtraConfigColumns, _d = BaseName, _c = IsAlias, _b = IsDrizzleTable, _a3 = ExtraConfigBuilder;
17498
17498
  Table2 = class {
17499
17499
  constructor(name2, schema4, baseName) {
17500
17500
  /**
17501
17501
  * @internal
17502
17502
  * Can be changed if the table is aliased.
17503
17503
  */
17504
- __publicField(this, _h);
17504
+ __publicField(this, _i);
17505
17505
  /**
17506
17506
  * @internal
17507
17507
  * Used to store the original name of the table, before any aliasing.
17508
17508
  */
17509
+ __publicField(this, _h);
17510
+ /** @internal */
17509
17511
  __publicField(this, _g);
17510
17512
  /** @internal */
17511
17513
  __publicField(this, _f);
17512
17514
  /** @internal */
17513
17515
  __publicField(this, _e);
17514
- /** @internal */
17515
- __publicField(this, _d);
17516
17516
  /**
17517
17517
  * @internal
17518
17518
  * Used to store the table name before the transformation via the `tableCreator` functions.
17519
17519
  */
17520
- __publicField(this, _c);
17520
+ __publicField(this, _d);
17521
+ /** @internal */
17522
+ __publicField(this, _c, false);
17521
17523
  /** @internal */
17522
- __publicField(this, _b, false);
17524
+ __publicField(this, _b, true);
17523
17525
  /** @internal */
17524
17526
  __publicField(this, _a3);
17525
17527
  this[TableName] = this[OriginalName] = name2;
@@ -17527,7 +17529,7 @@ var init_table = __esm({
17527
17529
  this[BaseName] = baseName;
17528
17530
  }
17529
17531
  };
17530
- __publicField(Table2, _i, "Table");
17532
+ __publicField(Table2, _j, "Table");
17531
17533
  /** @internal */
17532
17534
  __publicField(Table2, "Symbol", {
17533
17535
  Name: TableName,
@@ -33633,7 +33635,7 @@ We have encountered a collision between the index name on columns ${source_defau
33633
33635
  onUpdate = true;
33634
33636
  }
33635
33637
  const newColumn = {
33636
- default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !columnType.startsWith("decimal") ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
33638
+ default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !["decimal", "char", "varchar"].some((type) => columnType.startsWith(type)) ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
33637
33639
  autoincrement: isAutoincrement,
33638
33640
  name: columnName,
33639
33641
  type: changedType,
package/api.mjs CHANGED
@@ -8719,14 +8719,14 @@ var require_heap = __commonJS({
8719
8719
  return item;
8720
8720
  };
8721
8721
  heapify = function(array, cmp) {
8722
- var i, _i2, _j, _len, _ref, _ref1, _results, _results1;
8722
+ var i, _i2, _j2, _len, _ref, _ref1, _results, _results1;
8723
8723
  if (cmp == null) {
8724
8724
  cmp = defaultCmp;
8725
8725
  }
8726
8726
  _ref1 = function() {
8727
8727
  _results1 = [];
8728
- for (var _j2 = 0, _ref2 = floor(array.length / 2); 0 <= _ref2 ? _j2 < _ref2 : _j2 > _ref2; 0 <= _ref2 ? _j2++ : _j2--) {
8729
- _results1.push(_j2);
8728
+ for (var _j3 = 0, _ref2 = floor(array.length / 2); 0 <= _ref2 ? _j3 < _ref2 : _j3 > _ref2; 0 <= _ref2 ? _j3++ : _j3--) {
8729
+ _results1.push(_j3);
8730
8730
  }
8731
8731
  return _results1;
8732
8732
  }.apply(this).reverse();
@@ -8767,7 +8767,7 @@ var require_heap = __commonJS({
8767
8767
  return result.sort(cmp).reverse();
8768
8768
  };
8769
8769
  nsmallest = function(array, n, cmp) {
8770
- var elem, i, los, result, _i2, _j, _len, _ref, _ref1, _results;
8770
+ var elem, i, los, result, _i2, _j2, _len, _ref, _ref1, _results;
8771
8771
  if (cmp == null) {
8772
8772
  cmp = defaultCmp;
8773
8773
  }
@@ -8790,7 +8790,7 @@ var require_heap = __commonJS({
8790
8790
  }
8791
8791
  heapify(array, cmp);
8792
8792
  _results = [];
8793
- for (i = _j = 0, _ref1 = min2(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
8793
+ for (i = _j2 = 0, _ref1 = min2(n, array.length); 0 <= _ref1 ? _j2 < _ref1 : _j2 > _ref1; i = 0 <= _ref1 ? ++_j2 : --_j2) {
8794
8794
  _results.push(heappop(array, cmp));
8795
8795
  }
8796
8796
  return _results;
@@ -17485,7 +17485,7 @@ function getTableName(table4) {
17485
17485
  function getTableUniqueName(table4) {
17486
17486
  return `${table4[Schema] ?? "public"}.${table4[TableName]}`;
17487
17487
  }
17488
- var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, Table2;
17488
+ var TableName, Schema, Columns, ExtraConfigColumns, OriginalName, BaseName, IsAlias, ExtraConfigBuilder, IsDrizzleTable, _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, Table2;
17489
17489
  var init_table = __esm({
17490
17490
  "../drizzle-orm/dist/table.js"() {
17491
17491
  "use strict";
@@ -17499,32 +17499,34 @@ var init_table = __esm({
17499
17499
  IsAlias = Symbol.for("drizzle:IsAlias");
17500
17500
  ExtraConfigBuilder = Symbol.for("drizzle:ExtraConfigBuilder");
17501
17501
  IsDrizzleTable = Symbol.for("drizzle:IsDrizzleTable");
17502
- _i = entityKind, _h = TableName, _g = OriginalName, _f = Schema, _e = Columns, _d = ExtraConfigColumns, _c = BaseName, _b = IsAlias, _a3 = ExtraConfigBuilder;
17502
+ _j = entityKind, _i = TableName, _h = OriginalName, _g = Schema, _f = Columns, _e = ExtraConfigColumns, _d = BaseName, _c = IsAlias, _b = IsDrizzleTable, _a3 = ExtraConfigBuilder;
17503
17503
  Table2 = class {
17504
17504
  constructor(name2, schema4, baseName) {
17505
17505
  /**
17506
17506
  * @internal
17507
17507
  * Can be changed if the table is aliased.
17508
17508
  */
17509
- __publicField(this, _h);
17509
+ __publicField(this, _i);
17510
17510
  /**
17511
17511
  * @internal
17512
17512
  * Used to store the original name of the table, before any aliasing.
17513
17513
  */
17514
+ __publicField(this, _h);
17515
+ /** @internal */
17514
17516
  __publicField(this, _g);
17515
17517
  /** @internal */
17516
17518
  __publicField(this, _f);
17517
17519
  /** @internal */
17518
17520
  __publicField(this, _e);
17519
- /** @internal */
17520
- __publicField(this, _d);
17521
17521
  /**
17522
17522
  * @internal
17523
17523
  * Used to store the table name before the transformation via the `tableCreator` functions.
17524
17524
  */
17525
- __publicField(this, _c);
17525
+ __publicField(this, _d);
17526
+ /** @internal */
17527
+ __publicField(this, _c, false);
17526
17528
  /** @internal */
17527
- __publicField(this, _b, false);
17529
+ __publicField(this, _b, true);
17528
17530
  /** @internal */
17529
17531
  __publicField(this, _a3);
17530
17532
  this[TableName] = this[OriginalName] = name2;
@@ -17532,7 +17534,7 @@ var init_table = __esm({
17532
17534
  this[BaseName] = baseName;
17533
17535
  }
17534
17536
  };
17535
- __publicField(Table2, _i, "Table");
17537
+ __publicField(Table2, _j, "Table");
17536
17538
  /** @internal */
17537
17539
  __publicField(Table2, "Symbol", {
17538
17540
  Name: TableName,
@@ -33638,7 +33640,7 @@ We have encountered a collision between the index name on columns ${source_defau
33638
33640
  onUpdate = true;
33639
33641
  }
33640
33642
  const newColumn = {
33641
- default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !columnType.startsWith("decimal") ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
33643
+ default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !["decimal", "char", "varchar"].some((type) => columnType.startsWith(type)) ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
33642
33644
  autoincrement: isAutoincrement,
33643
33645
  name: columnName,
33644
33646
  type: changedType,
package/bin.cjs CHANGED
@@ -18110,7 +18110,7 @@ We have encountered a collision between the index name on columns ${source_defau
18110
18110
  onUpdate = true;
18111
18111
  }
18112
18112
  const newColumn = {
18113
- default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !columnType.startsWith("decimal") ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
18113
+ default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) && !["decimal", "char", "varchar"].some((type) => columnType.startsWith(type)) ? Number(columnDefault) : isDefaultAnExpression ? clearDefaults(columnDefault, collation) : `'${columnDefault}'`,
18114
18114
  autoincrement: isAutoincrement,
18115
18115
  name: columnName,
18116
18116
  type: changedType,
@@ -75298,6 +75298,7 @@ var init_introspect_mysql = __esm({
75298
75298
  patched = patched.startsWith("datetime(") ? "datetime" : patched;
75299
75299
  patched = patched.startsWith("varbinary(") ? "varbinary" : patched;
75300
75300
  patched = patched.startsWith("int(") ? "int" : patched;
75301
+ patched = patched.startsWith("double(") ? "double" : patched;
75301
75302
  return patched;
75302
75303
  }).filter((type) => {
75303
75304
  return mysqlImportsList.has(type);
@@ -83402,7 +83403,7 @@ init_utils2();
83402
83403
  var version2 = async () => {
83403
83404
  const { npmVersion } = await ormCoreVersions();
83404
83405
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
83405
- const envVersion = "0.23.2-6f27447";
83406
+ const envVersion = "0.23.2-cd71182";
83406
83407
  const kitVersion = envVersion ? `v${envVersion}` : "--";
83407
83408
  const versions = `drizzle-kit: ${kitVersion}
83408
83409
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.23.2-6f27447",
3
+ "version": "0.23.2-cd71182",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",