drizzle-kit 0.19.4 → 0.19.5-4035c5a
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs +7 -4
- package/package.json +1 -1
- package/utils.js +2 -2
package/index.cjs
CHANGED
@@ -15011,7 +15011,7 @@ var init_sqlgenerator = __esm({
|
|
15011
15011
|
if (typeof compositePKs !== "undefined" && compositePKs.length > 0) {
|
15012
15012
|
statement += ",\n";
|
15013
15013
|
const compositePK4 = MySqlSquasher.unsquashPK(compositePKs[0]);
|
15014
|
-
statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(
|
15014
|
+
statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(\`${compositePK4.columns.join(`\`,\``)}\`)`;
|
15015
15015
|
}
|
15016
15016
|
if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
|
15017
15017
|
for (const uniqueConstraint4 of uniqueConstraints) {
|
@@ -15054,7 +15054,7 @@ var init_sqlgenerator = __esm({
|
|
15054
15054
|
}
|
15055
15055
|
compositePKs.forEach((it) => {
|
15056
15056
|
statement += ",\n ";
|
15057
|
-
statement += `PRIMARY KEY(${it.map((it2) => `\`${it2}\``).join(", ")})
|
15057
|
+
statement += `PRIMARY KEY(${it.map((it2) => `\`${it2}\``).join(", ")})`;
|
15058
15058
|
});
|
15059
15059
|
for (let i = 0; i < referenceData.length; i++) {
|
15060
15060
|
const referenceAsString = referenceData[i];
|
@@ -37657,6 +37657,9 @@ import { sql } from "drizzle-orm"
|
|
37657
37657
|
if (typeof defaultValue === "string" && defaultValue.startsWith("(") && defaultValue.endsWith(")")) {
|
37658
37658
|
return `sql\`${defaultValue}\``;
|
37659
37659
|
}
|
37660
|
+
if (defaultValue === "NULL") {
|
37661
|
+
return `sql\`NULL\``;
|
37662
|
+
}
|
37660
37663
|
return defaultValue;
|
37661
37664
|
};
|
37662
37665
|
column5 = (type, name, defaultValue, autoincrement, casing) => {
|
@@ -51858,7 +51861,7 @@ init_source();
|
|
51858
51861
|
// package.json
|
51859
51862
|
var package_default = {
|
51860
51863
|
name: "drizzle-kit",
|
51861
|
-
version: "0.19.
|
51864
|
+
version: "0.19.5",
|
51862
51865
|
repository: "https://github.com/drizzle-team/drizzle-kit-mirror",
|
51863
51866
|
author: "Drizzle Team",
|
51864
51867
|
license: "MIT",
|
@@ -52700,7 +52703,7 @@ var dbPushMysqlCommand = new import_commander.Command("push:mysql").option(
|
|
52700
52703
|
var dbPushSqliteCommand = new import_commander.Command("push:sqlite").option(
|
52701
52704
|
"--config <config>",
|
52702
52705
|
"Path to a config.ts file, drizzle.config.ts by default"
|
52703
|
-
).option("--tableFilters", `Table name filters`).option("--connectionString <connectionString>", "SQLite connection string").option("--driver <driver>", "SQLite database path").option("--url <url>", "SQLite database path").option("--auth-token <authToken>", "SQLite database path").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
|
52706
|
+
).option("--schema <schema>", "Path to a schema file or folder").option("--tableFilters", `Table name filters`).option("--connectionString <connectionString>", "SQLite connection string").option("--driver <driver>", "SQLite database path").option("--url <url>", "SQLite database path").option("--auth-token <authToken>", "SQLite database path").option("--verbose", "Print all statements for each push").option("--strict", "Always ask for confirmation").action(async (options) => {
|
52704
52707
|
printVersions();
|
52705
52708
|
assertPackages("drizzle-orm");
|
52706
52709
|
assertOrmCoreVersion();
|
package/package.json
CHANGED
package/utils.js
CHANGED
@@ -13725,7 +13725,7 @@ var MySqlCreateTableConvertor = class extends Convertor {
|
|
13725
13725
|
if (typeof compositePKs !== "undefined" && compositePKs.length > 0) {
|
13726
13726
|
statement += ",\n";
|
13727
13727
|
const compositePK4 = MySqlSquasher.unsquashPK(compositePKs[0]);
|
13728
|
-
statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(
|
13728
|
+
statement += ` CONSTRAINT \`${st.compositePkName}\` PRIMARY KEY(\`${compositePK4.columns.join(`\`,\``)}\`)`;
|
13729
13729
|
}
|
13730
13730
|
if (typeof uniqueConstraints !== "undefined" && uniqueConstraints.length > 0) {
|
13731
13731
|
for (const uniqueConstraint4 of uniqueConstraints) {
|
@@ -13768,7 +13768,7 @@ var SQLiteCreateTableConvertor = class extends Convertor {
|
|
13768
13768
|
}
|
13769
13769
|
compositePKs.forEach((it) => {
|
13770
13770
|
statement += ",\n ";
|
13771
|
-
statement += `PRIMARY KEY(${it.map((it2) => `\`${it2}\``).join(", ")})
|
13771
|
+
statement += `PRIMARY KEY(${it.map((it2) => `\`${it2}\``).join(", ")})`;
|
13772
13772
|
});
|
13773
13773
|
for (let i = 0; i < referenceData.length; i++) {
|
13774
13774
|
const referenceAsString = referenceData[i];
|