Add timestamp to mods for some resumability

This commit is contained in:
2021-07-29 00:50:42 -04:00
parent a8424e830e
commit fc5a9d39c2
5 changed files with 61 additions and 6 deletions

View File

@@ -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.

View File

@@ -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";