drizzle-kit 0.19.11-052f5fd → 0.19.11-6f50bf8
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/index.cjs +3 -6
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -12920,7 +12920,7 @@ The unique constraint ${source_default.underline.blue(
|
|
|
12920
12920
|
const newColumn = {
|
|
12921
12921
|
default: columnDefault === null ? void 0 : /^-?[\d.]+(?:e-?\d+)?$/.test(columnDefault) ? Number(columnDefault) : ["CURRENT_TIME", "CURRENT_DATE", "CURRENT_TIMESTAMP"].includes(
|
|
12922
12922
|
columnDefault
|
|
12923
|
-
) ? `(${columnDefault})` : columnDefault === "false" ? false : columnDefault === "true" ? true : columnDefault.startsWith("'
|
|
12923
|
+
) ? `(${columnDefault})` : columnDefault === "false" ? false : columnDefault === "true" ? true : columnDefault.startsWith('"') && columnDefault.endsWith('"') ? columnDefault.substring(1, columnDefault.length - 1) : columnDefault,
|
|
12924
12924
|
autoincrement: isAutoincrement,
|
|
12925
12925
|
name: columnName,
|
|
12926
12926
|
type: mapSqlToSqliteType(columnType),
|
|
@@ -13021,7 +13021,7 @@ FROM sqlite_master AS m,
|
|
|
13021
13021
|
pragma_index_list(m.name) AS il,
|
|
13022
13022
|
pragma_index_info(il.name) AS ii
|
|
13023
13023
|
WHERE
|
|
13024
|
-
m.type = 'table'
|
|
13024
|
+
m.type = 'table';`
|
|
13025
13025
|
);
|
|
13026
13026
|
for (const idxRow of idxs) {
|
|
13027
13027
|
const tableName = idxRow.tableName;
|
|
@@ -43084,9 +43084,6 @@ import { sql } from "drizzle-orm"
|
|
|
43084
43084
|
if (defaultValue === "NULL") {
|
|
43085
43085
|
return `sql\`NULL\``;
|
|
43086
43086
|
}
|
|
43087
|
-
if (typeof defaultValue === "string" && defaultValue.startsWith("'") && defaultValue.endsWith("'")) {
|
|
43088
|
-
return defaultValue.substring(1, defaultValue.length - 1);
|
|
43089
|
-
}
|
|
43090
43087
|
return defaultValue;
|
|
43091
43088
|
};
|
|
43092
43089
|
column6 = (type, name, defaultValue, autoincrement, casing) => {
|
|
@@ -43103,7 +43100,7 @@ import { sql } from "drizzle-orm"
|
|
|
43103
43100
|
}
|
|
43104
43101
|
if (lowered === "text") {
|
|
43105
43102
|
let out = `${withCasing3(name, casing)}: text("${name}")`;
|
|
43106
|
-
out += defaultValue ? `.default(
|
|
43103
|
+
out += defaultValue ? `.default(${mapColumnDefault2(defaultValue)})` : "";
|
|
43107
43104
|
return out;
|
|
43108
43105
|
}
|
|
43109
43106
|
if (lowered === "blob") {
|