drizzle-kit 0.30.3-991e8b4 → 0.30.3-a42bb03
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 +10 -11
- package/package.json +1 -1
package/bin.cjs
CHANGED
@@ -70965,7 +70965,7 @@ import { sql } from "drizzle-orm"
|
|
70965
70965
|
if (lowered.startsWith("int")) {
|
70966
70966
|
const isUnsigned = lowered.startsWith("int unsigned");
|
70967
70967
|
const columnName = dbColumnName2({ name, casing: rawCasing, withMode: isUnsigned });
|
70968
|
-
let out = `${casing2(name)}: int(${columnName}${isUnsigned ? "{ unsigned: true }
|
70968
|
+
let out = `${casing2(name)}: int(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
70969
70969
|
out += autoincrement ? `.autoincrement()` : "";
|
70970
70970
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
70971
70971
|
return out;
|
@@ -70973,7 +70973,7 @@ import { sql } from "drizzle-orm"
|
|
70973
70973
|
if (lowered.startsWith("tinyint")) {
|
70974
70974
|
const isUnsigned = lowered.startsWith("tinyint unsigned");
|
70975
70975
|
const columnName = dbColumnName2({ name, casing: rawCasing, withMode: isUnsigned });
|
70976
|
-
let out = `${casing2(name)}: tinyint(${columnName}${isUnsigned ? "{ unsigned: true }
|
70976
|
+
let out = `${casing2(name)}: tinyint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
70977
70977
|
out += autoincrement ? `.autoincrement()` : "";
|
70978
70978
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
70979
70979
|
return out;
|
@@ -70981,7 +70981,7 @@ import { sql } from "drizzle-orm"
|
|
70981
70981
|
if (lowered.startsWith("smallint")) {
|
70982
70982
|
const isUnsigned = lowered.startsWith("smallint unsigned");
|
70983
70983
|
const columnName = dbColumnName2({ name, casing: rawCasing, withMode: isUnsigned });
|
70984
|
-
let out = `${casing2(name)}: smallint(${columnName}${isUnsigned ? "{ unsigned: true }
|
70984
|
+
let out = `${casing2(name)}: smallint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
70985
70985
|
out += autoincrement ? `.autoincrement()` : "";
|
70986
70986
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
70987
70987
|
return out;
|
@@ -70989,7 +70989,7 @@ import { sql } from "drizzle-orm"
|
|
70989
70989
|
if (lowered.startsWith("mediumint")) {
|
70990
70990
|
const isUnsigned = lowered.startsWith("mediumint unsigned");
|
70991
70991
|
const columnName = dbColumnName2({ name, casing: rawCasing, withMode: isUnsigned });
|
70992
|
-
let out = `${casing2(name)}: mediumint(${columnName}${isUnsigned ? "{ unsigned: true }
|
70992
|
+
let out = `${casing2(name)}: mediumint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
70993
70993
|
out += autoincrement ? `.autoincrement()` : "";
|
70994
70994
|
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue, isExpression)})` : "";
|
70995
70995
|
return out;
|
@@ -71239,8 +71239,7 @@ import { sql } from "drizzle-orm"
|
|
71239
71239
|
let idxKey = it.name.startsWith(tableName) && it.name !== tableName ? it.name.slice(tableName.length + 1) : it.name;
|
71240
71240
|
idxKey = idxKey.endsWith("_index") ? idxKey.slice(0, -"_index".length) + "_idx" : idxKey;
|
71241
71241
|
idxKey = casing2(idxKey);
|
71242
|
-
statement += `
|
71243
|
-
`;
|
71242
|
+
statement += ` ${idxKey}: `;
|
71244
71243
|
statement += it.isUnique ? "uniqueIndex(" : "index(";
|
71245
71244
|
statement += `"${it.name}")`;
|
71246
71245
|
statement += `.on(${it.columns.map((it2) => `table.${casing2(it2)}`).join(", ")}),`;
|
@@ -72405,7 +72404,7 @@ import { sql } from "drizzle-orm"
|
|
72405
72404
|
if (lowered.startsWith("int")) {
|
72406
72405
|
const isUnsigned = lowered.includes("unsigned");
|
72407
72406
|
const columnName = dbColumnName4({ name, casing: rawCasing, withMode: isUnsigned });
|
72408
|
-
let out = `${casing2(name)}: int(${columnName}${isUnsigned ? "{ unsigned: true }
|
72407
|
+
let out = `${casing2(name)}: int(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
72409
72408
|
out += autoincrement ? `.autoincrement()` : "";
|
72410
72409
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault4(defaultValue, isExpression)})` : "";
|
72411
72410
|
return out;
|
@@ -72413,7 +72412,7 @@ import { sql } from "drizzle-orm"
|
|
72413
72412
|
if (lowered.startsWith("tinyint")) {
|
72414
72413
|
const isUnsigned = lowered.includes("unsigned");
|
72415
72414
|
const columnName = dbColumnName4({ name, casing: rawCasing, withMode: isUnsigned });
|
72416
|
-
let out = `${casing2(name)}: tinyint(${columnName}${isUnsigned ? "{ unsigned: true }
|
72415
|
+
let out = `${casing2(name)}: tinyint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
72417
72416
|
out += autoincrement ? `.autoincrement()` : "";
|
72418
72417
|
out += typeof defaultValue !== "undefined" ? `.default(${mapColumnDefault4(defaultValue, isExpression)})` : "";
|
72419
72418
|
return out;
|
@@ -72421,7 +72420,7 @@ import { sql } from "drizzle-orm"
|
|
72421
72420
|
if (lowered.startsWith("smallint")) {
|
72422
72421
|
const isUnsigned = lowered.includes("unsigned");
|
72423
72422
|
const columnName = dbColumnName4({ name, casing: rawCasing, withMode: isUnsigned });
|
72424
|
-
let out = `${casing2(name)}: smallint(${columnName}${isUnsigned ? "{ unsigned: true }
|
72423
|
+
let out = `${casing2(name)}: smallint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
72425
72424
|
out += autoincrement ? `.autoincrement()` : "";
|
72426
72425
|
out += defaultValue ? `.default(${mapColumnDefault4(defaultValue, isExpression)})` : "";
|
72427
72426
|
return out;
|
@@ -72429,7 +72428,7 @@ import { sql } from "drizzle-orm"
|
|
72429
72428
|
if (lowered.startsWith("mediumint")) {
|
72430
72429
|
const isUnsigned = lowered.includes("unsigned");
|
72431
72430
|
const columnName = dbColumnName4({ name, casing: rawCasing, withMode: isUnsigned });
|
72432
|
-
let out = `${casing2(name)}: mediumint(${columnName}${isUnsigned ? "{ unsigned: true }
|
72431
|
+
let out = `${casing2(name)}: mediumint(${columnName}${isUnsigned ? `${columnName.length > 0 ? ", " : ""}{ unsigned: true }` : ""})`;
|
72433
72432
|
out += autoincrement ? `.autoincrement()` : "";
|
72434
72433
|
out += defaultValue ? `.default(${mapColumnDefault4(defaultValue, isExpression)})` : "";
|
72435
72434
|
return out;
|
@@ -79542,7 +79541,7 @@ init_utils5();
|
|
79542
79541
|
var version2 = async () => {
|
79543
79542
|
const { npmVersion } = await ormCoreVersions();
|
79544
79543
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
79545
|
-
const envVersion = "0.30.3-
|
79544
|
+
const envVersion = "0.30.3-a42bb03";
|
79546
79545
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
79547
79546
|
const versions = `drizzle-kit: ${kitVersion}
|
79548
79547
|
${ormVersion}`;
|