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`); + } +}