apps: updateTime should be null if never updated
"TIMESTAMP NULL" is an attribute modifier to make the column nullable. Without it, if you assign null, the timestamp becomes the current time!
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
'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 */) {
|
||||
};
|
||||
Reference in New Issue
Block a user