"TIMESTAMP NULL" is an attribute modifier to make the column nullable. Without it, if you assign null, the timestamp becomes the current time!
10 lines
278 B
JavaScript
10 lines
278 B
JavaScript
'use strict';
|
|
|
|
exports.up = async function(db) {
|
|
await db.runSql('ALTER TABLE apps MODIFY updateTime TIMESTAMP NULL DEFAULT NULL');
|
|
await db.runSql('UPDATE apps SET updateTime=? WHERE creationTime=updateTime', [ null ]);
|
|
};
|
|
|
|
exports.down = async function(/* db */) {
|
|
};
|