diff --git a/packages/backend/migration/1705475608437-reversi.js b/packages/backend/migration/1705475608437-reversi.js index 45d8c614be..4d7416d1b3 100644 --- a/packages/backend/migration/1705475608437-reversi.js +++ b/packages/backend/migration/1705475608437-reversi.js @@ -7,16 +7,10 @@ export class Reversi1705475608437 { name = 'Reversi1705475608437' async up(queryRunner) { - // await queryRunner.query(`DROP INDEX "public"."IDX_b46ec40746efceac604142be1c"`); - // await queryRunner.query(`DROP INDEX "public"."IDX_b604d92d6c7aec38627f6eaf16"`); - // await queryRunner.query(`ALTER TABLE "reversi_game" DROP COLUMN "createdAt"`); - // await queryRunner.query(`ALTER TABLE "reversi_matching" DROP COLUMN "createdAt"`); + await queryRunner.query(`ALTER TABLE "reversi_game" ALTER COLUMN "createdAt" SET DEFAULT now()`); } async down(queryRunner) { - // await queryRunner.query(`ALTER TABLE "reversi_matching" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`); - // await queryRunner.query(`ALTER TABLE "reversi_game" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`); - // await queryRunner.query(`CREATE INDEX "IDX_b604d92d6c7aec38627f6eaf16" ON "reversi_matching" ("createdAt") `); - // await queryRunner.query(`CREATE INDEX "IDX_b46ec40746efceac604142be1c" ON "reversi_game" ("createdAt") `); + await queryRunner.query(`ALTER TABLE "reversi_game" ALTER COLUMN "createdAt" DROP DEFAULT`); } } diff --git a/packages/backend/migration/1706011243939-UserProfileBirthdayIndex.js b/packages/backend/migration/1706011243939-UserProfileBirthdayIndex.js new file mode 100644 index 0000000000..d90d5832b0 --- /dev/null +++ b/packages/backend/migration/1706011243939-UserProfileBirthdayIndex.js @@ -0,0 +1,16 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class UserProfileBirthdayIndex1706011243939 { + name = 'UserProfileBirthdayIndex1706011243939' + + async up(queryRunner) { + await queryRunner.query(`CREATE INDEX "IDX_58699f75b9cf904f5f007909cb" ON "user_profile" ("birthday") `); + } + + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "public"."IDX_58699f75b9cf904f5f007909cb"`); + } +}