From 372385b755678ba767bbd36311fef19b025cb905 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Wed, 17 Sep 2025 15:19:08 -0400 Subject: [PATCH] fix DB type of MiUser.lastFetchedFeaturedAt --- ...36690898-fix-user-lastFetchedFeaturedAt-type.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/backend/migration/1758136690898-fix-user-lastFetchedFeaturedAt-type.js diff --git a/packages/backend/migration/1758136690898-fix-user-lastFetchedFeaturedAt-type.js b/packages/backend/migration/1758136690898-fix-user-lastFetchedFeaturedAt-type.js new file mode 100644 index 0000000000..4a0d767eb9 --- /dev/null +++ b/packages/backend/migration/1758136690898-fix-user-lastFetchedFeaturedAt-type.js @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class FixUserLastFetchedFeaturedAtType1758136690898 { + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "lastFetchedFeaturedAt" TYPE TIMESTAMP WITH TIME ZONE`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "lastFetchedFeaturedAt" TYPE DATE`); + } +}