Add timestamp to mods for some resumability
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
ALTER TABLE "files" ADD COLUMN "downloaded_at" TIMESTAMP(3);
|
||||
|
||||
/* Backfill existing columns the created_at timestamps.
|
||||
/* Backfill existing columns using the created_at timestamps.
|
||||
*
|
||||
* This is approximate since usually the file was downloaded shortly after the record was created.
|
||||
* I mostly only care whether it is null or not null. All existing files need non-null values.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE "mods" ADD COLUMN "last_updated_files_at" TIMESTAMP(3);
|
||||
|
||||
/* Backfill existing columns using the updated_at timestamps.
|
||||
*
|
||||
* This is approximate since usually the files are downloaded shortly after the mod record was created.
|
||||
* I mostly only care whether it is null or not null. Most existing mods need non-null values.
|
||||
*/
|
||||
UPDATE "mods" SET "last_updated_files_at" = "updated_at";
|
||||
Reference in New Issue
Block a user