drizzle-kit 0.9.38 → 0.9.39
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.js +1 -1
- package/index.js.map +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -167473,7 +167473,7 @@ var AlterTableAddColumnConvertor = class extends Convertor {
|
|
|
167473
167473
|
const { tableName, column } = statement;
|
|
167474
167474
|
const { name, type: type2, notNull } = column;
|
|
167475
167475
|
const defaultValue = column.defaultValue;
|
|
167476
|
-
const defaultStatement = `${defaultValue ? `DEFAULT ${defaultValue}` : ""}`;
|
|
167476
|
+
const defaultStatement = `${defaultValue !== void 0 ? `DEFAULT ${defaultValue}` : ""}`;
|
|
167477
167477
|
const notNullStatement = `${notNull ? "NOT NULL" : ""}`;
|
|
167478
167478
|
return `ALTER TABLE ${tableName} ADD COLUMN "${name}" ${type2} ${defaultStatement} ${notNullStatement}`.replace(/ +/g, " ").trim() + ";";
|
|
167479
167479
|
}
|