tthr 0.0.35 → 0.0.36
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/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -306,7 +306,7 @@ function buildColumnSql(colName, def, forAlterTable = false) {
|
|
|
306
306
|
if (addingPrimaryKey) colSql += " PRIMARY KEY";
|
|
307
307
|
if (def.notNull && !forAlterTable) colSql += " NOT NULL";
|
|
308
308
|
if (def.unique && !addingPrimaryKey) colSql += " UNIQUE";
|
|
309
|
-
if (def.hasDefault && def.type === "timestamp") {
|
|
309
|
+
if (def.hasDefault && def.type === "timestamp" && !forAlterTable) {
|
|
310
310
|
colSql += " DEFAULT (datetime('now'))";
|
|
311
311
|
}
|
|
312
312
|
if (def.references) {
|