summaryrefslogtreecommitdiff
path: root/packages/backend/migration
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2025-12-31 22:33:26 +0900
committerGitHub <noreply@github.com>2025-12-31 22:33:26 +0900
commit16ffd88ecc16c394fd8bc532c61e6be45b053ca5 (patch)
tree0b02678fefb78eafa1fae85aaafeba078fc21870 /packages/backend/migration
parentfix(frontend): ウィジェットの設定画面のプレビューが利用... (diff)
downloadmisskey-16ffd88ecc16c394fd8bc532c61e6be45b053ca5.tar.gz
misskey-16ffd88ecc16c394fd8bc532c61e6be45b053ca5.tar.bz2
misskey-16ffd88ecc16c394fd8bc532c61e6be45b053ca5.zip
enhance: 誕生日のユーザーウィジェットで、今日だけに限らず、直近の誕生日ユーザーを表示できるように (#13637)
* enhance(frontend): 「今日誕生日のフォロー中ユーザー」ウィジェットをリファクタリング (cherry picked from commit 24652b9364fd7d898ac176e0da3bb6e957f72328) * fix(backend): 年越しの時期で誕生日検索クエリーが誤動作する問題を修正 (MisskeyIO#577) (cherry picked from commit 38581006be35b4725b235be9f178d2c0c9c5af33) * fix * spdx * delete birthday param on users/following api * 名称を一本化 * Update Changelog * Update Changelog * fix(frontend/WidgetBirthdayFollowings): ユーザーの名前が長いと投稿ボタンがはみ出てしまう問題を修正 (MisskeyIO#582) (cherry picked from commit fa47a545b1b770e5f3e52bb2798d1104da5dd244) * use module css * default 3day * Revert "delete birthday param on users/following api" This reverts commit a47456c1c43410409ed3607ae1d6ebb69a82324b. * Update Changelog * 日付が1ヶ月ズレている問題を修正? * fix: 日付関連のバグを修正 Co-authored-by: taiy <53635909+taiyme@users.noreply.github.com> * build misskey-js types * add comment * Update CHANGELOG.md * migrate * change migration * UPdate Changelog * fix: revert unnecessary changes * :art: * i18n * fix * update changelog * :art: * fix lint * refactor: remove unnecessary classes * fix * fix --------- Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> Co-authored-by: taiy <53635909+taiyme@users.noreply.github.com>
Diffstat (limited to 'packages/backend/migration')
-rw-r--r--packages/backend/migration/1767169026317-birthday-index.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/backend/migration/1767169026317-birthday-index.js b/packages/backend/migration/1767169026317-birthday-index.js
new file mode 100644
index 0000000000..972fc08c9b
--- /dev/null
+++ b/packages/backend/migration/1767169026317-birthday-index.js
@@ -0,0 +1,20 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export class BirthdayIndex1767169026317 {
+ name = 'BirthdayIndex1767169026317'
+
+ async up(queryRunner) {
+ await queryRunner.query(`DROP INDEX "public"."IDX_de22cd2b445eee31ae51cdbe99"`);
+ await queryRunner.query(`CREATE OR REPLACE FUNCTION get_birthday_date(birthday TEXT) RETURNS SMALLINT AS $$ BEGIN RETURN CAST((SUBSTR(birthday, 6, 2) || SUBSTR(birthday, 9, 2)) AS SMALLINT); END; $$ LANGUAGE plpgsql IMMUTABLE;`);
+ await queryRunner.query(`CREATE INDEX "IDX_USERPROFILE_BIRTHDAY_DATE" ON "user_profile" (get_birthday_date("birthday"))`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`CREATE INDEX "IDX_de22cd2b445eee31ae51cdbe99" ON "user_profile" (substr("birthday", 6, 5))`);
+ await queryRunner.query(`DROP INDEX "public"."IDX_USERPROFILE_BIRTHDAY_DATE"`);
+ await queryRunner.query(`DROP FUNCTION IF EXISTS get_birthday_date(birthday TEXT)`);
+ }
+}