egirlskey/packages/backend/migration
Namekuji d28866f71a
enhance: account migration (#10592)
* copy block and mute then create follow and unfollow jobs

* copy block and mute and update lists when detecting an account has moved

* no need to care promise orders

* refactor updating actor and target

* automatically accept if a locked account had accepted an old account

* fix exception format

* prevent the old account from calling some endpoints

* do not unfollow when moving

* adjust following and follower counts

* check movedToUri when receiving a follow request

* skip if no need to adjust

* Revert "disable account migration"

This reverts commit 2321214c98.

* fix translation specifier

* fix checking alsoKnownAs and uri

* fix updating account

* fix refollowing locked account

* decrease followersCount if followed by the old account

* adjust following and followers counts when unfollowing

* fix copying mutings

* prohibit moved account from moving again

* fix move service

* allow app creation after moving

* fix lint

* remove unnecessary field

* fix cache update

* add e2e test

* add e2e test of accepting the new account automatically

* force follow if any error happens

* remove unnecessary joins

* use Array.map instead of for const of

* ユーザーリストの移行は追加のみを行う

* nanka iroiro

* fix misskey-js?

* ✌️

* 移行を行ったアカウントからのフォローリクエストの自動許可を調整

* newUriを外に出す

* newUriを外に出す2

* clean up

* fix newUri

* prevent moving if the destination account has already moved

* set alsoKnownAs via /i/update

* fix database initialization

* add return type

* prohibit updating alsoKnownAs after moving

* skip to add to alsoKnownAs if toUrl is known

* skip adding to the list if it already has

* use Acct.parse instead

* rename error code

* 🎨

* 制限を5から10に緩和

* movedTo(Uri), alsoKnownAsはユーザーidを返すように

* test api res

* fix

* 元アカウントはミュートし続ける

* 🎨

* unfollow

* fix

* getUserUriをUserEntityServiceに

* ?

* job!

* 🎨

* instance => server

* accountMovedShort, forbiddenBecauseYouAreMigrated

* accountMovedShort

* fix test

* import, pin禁止

* 実績を凍結する

* clean up

* ✌️

* change message

* ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに

* Revert "ブロック, フォロー, ミュート, リストのインポートファイルの制限を32MiBに"

This reverts commit 3bd7be35d8aa455cb01ae58f8172a71a50485db1.

* validateAlsoKnownAs

* 移行後2時間以内はインポート可能なファイルサイズを拡大

* clean up

* どうせactorをupdatePersonで更新するならupdatePersonしか移行処理を発行しないことにする

* handle error?

* リモートからの移行処理の条件を是正

* log, port

* fix

* fix

* enhance(dev): non-production環境でhttpサーバー間でもユーザー、ノートの連合が可能なように

* refactor (use checkHttps)

* MISSKEY_WEBFINGER_USE_HTTP

* Environment Variable readme

* NEVER USE IN PRODUCTION

* fix punyHost

* fix indent

* fix

* experimental

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-04-30 00:09:29 +09:00
..
1000000000000-Init.js fix migrations 2022-03-01 00:07:03 +09:00
1556348509290-Pages.js fix migrations 2022-03-01 00:07:03 +09:00
1556746559567-UserProfile.js fix migrations 2022-03-01 00:07:03 +09:00
1557476068003-PinnedUsers.js fix migrations 2022-03-01 00:07:03 +09:00
1557761316509-AddSomeUrls.js fix migrations 2022-03-01 00:07:03 +09:00
1557932705754-ObjectStorageSetting.js fix migrations 2022-03-01 00:07:03 +09:00
1558072954435-PageLike.js fix migrations 2022-03-01 00:07:03 +09:00
1558103093633-UserGroup.js fix migrations 2022-03-01 00:07:03 +09:00
1558257926829-UserGroupInvite.js fix migrations 2022-03-01 00:07:03 +09:00
1558266512381-UserListJoining.js fix migrations 2022-03-01 00:07:03 +09:00
1561706992953-webauthn.js fix migrations 2022-03-01 00:07:03 +09:00
1561873850023-ChartIndexes.js fix migrations 2022-03-01 00:07:03 +09:00
1562422242907-PasswordLessLogin.js fix migrations 2022-03-01 00:07:03 +09:00
1562444565093-PinnedPage.js fix migrations 2022-03-01 00:07:03 +09:00
1562448332510-PageTitleHideOption.js fix migrations 2022-03-01 00:07:03 +09:00
1562869971568-ModerationLog.js fix migrations 2022-03-01 00:07:03 +09:00
1563757595828-UsedUsername.js fix migrations 2022-03-01 00:07:03 +09:00
1565634203341-room.js fix migrations 2022-03-01 00:07:03 +09:00
1571220798684-CustomEmojiCategory.js fix migrations 2022-03-01 00:07:03 +09:00
1572760203493-nodeinfo.js fix migrations 2022-03-01 00:07:03 +09:00
1576269851876-TalkFederationId.js fix migrations 2022-03-01 00:07:03 +09:00
1576869585998-ProxyRemoteFiles.js fix migrations 2022-03-01 00:07:03 +09:00
1579267006611-v12.js fix migrations 2022-03-01 00:07:03 +09:00
1579270193251-v12-2.js fix migrations 2022-03-01 00:07:03 +09:00
1579282808087-v12-3.js fix migrations 2022-03-01 00:07:03 +09:00
1579544426412-v12-4.js fix migrations 2022-03-01 00:07:03 +09:00
1579977526288-v12-5.js fix migrations 2022-03-01 00:07:03 +09:00
1579993013959-v12-6.js fix migrations 2022-03-01 00:07:03 +09:00
1580069531114-v12-7.js fix migrations 2022-03-01 00:07:03 +09:00
1580148575182-v12-8.js fix migrations 2022-03-01 00:07:03 +09:00
1580154400017-v12-9.js fix migrations 2022-03-01 00:07:03 +09:00
1580276619901-v12-10.js fix migrations 2022-03-01 00:07:03 +09:00
1580331224276-v12-11.js fix migrations 2022-03-01 00:07:03 +09:00
1580508795118-v12-12.js fix migrations 2022-03-01 00:07:03 +09:00
1580543501339-v12-13.js fix migrations 2022-03-01 00:07:03 +09:00
1580864313253-v12-14.js fix migrations 2022-03-01 00:07:03 +09:00
1581526429287-user-group-invitation.js fix migrations 2022-03-01 00:07:03 +09:00
1581695816408-user-group-antenna.js fix migrations 2022-03-01 00:07:03 +09:00
1581708415836-drive-user-folder-id-index.js fix migrations 2022-03-01 00:07:03 +09:00
1581979837262-promo.js fix migrations 2022-03-01 00:07:03 +09:00
1582019042083-featured-injecttion.js fix migrations 2022-03-01 00:07:03 +09:00
1582210532752-antenna-exclude.js fix migrations 2022-03-01 00:07:03 +09:00
1582875306439-note-reaction-length.js fix migrations 2022-03-01 00:07:03 +09:00
1585361548360-miauth.js fix migrations 2022-03-01 00:07:03 +09:00
1585385921215-custom-notification.js fix migrations 2022-03-01 00:07:03 +09:00
1585772678853-ap-url.js fix migrations 2022-03-01 00:07:03 +09:00
1586624197029-AddObjectStorageUseProxy.js fix migrations 2022-03-01 00:07:03 +09:00
1586641139527-remote-reaction.js fix migrations 2022-03-01 00:07:03 +09:00
1586708940386-pageAiScript.js fix migrations 2022-03-01 00:07:03 +09:00
1588044505511-hCaptcha.js fix migrations 2022-03-01 00:07:03 +09:00
1589023282116-pubRelay.js fix migrations 2022-03-01 00:07:03 +09:00
1595075960584-blurhash.js fix migrations 2022-03-01 00:07:03 +09:00
1595077605646-blurhash-for-avatar-banner.js fix migrations 2022-03-01 00:07:03 +09:00
1595676934834-instance-icon-url.js fix migrations 2022-03-01 00:07:03 +09:00
1595771249699-word-mute.js fix migrations 2022-03-01 00:07:03 +09:00
1595782306083-word-mute2.js fix migrations 2022-03-01 00:07:03 +09:00
1596548170836-channel.js fix migrations 2022-03-01 00:07:03 +09:00
1596786425167-channel2.js fix migrations 2022-03-01 00:07:03 +09:00
1597230137744-objectStorageSetPublicRead.js fix migrations 2022-03-01 00:07:03 +09:00
1597236229720-IncludingNotificationTypes.js fix migrations 2022-03-01 00:07:03 +09:00
1597385880794-add-sensitive-index.js fix migrations 2022-03-01 00:07:03 +09:00
1597459042300-channel-unread.js fix migrations 2022-03-01 00:07:03 +09:00
1597893996136-ChannelNoteIdDescIndex.js fix migrations 2022-03-01 00:07:03 +09:00
1600353287890-mutingNotificationTypes.js fix migrations 2022-03-01 00:07:03 +09:00
1603094348345-refine-abuse-user-report.js fix migrations 2022-03-01 00:07:03 +09:00
1603095701770-refine-abuse-user-report2.js fix migrations 2022-03-01 00:07:03 +09:00
1603776877564-instance-theme-color.js fix migrations 2022-03-01 00:07:03 +09:00
1603781553011-instance-favicon.js fix migrations 2022-03-01 00:07:03 +09:00
1604821689616-delete-auto-watch.js fix migrations 2022-03-01 00:07:03 +09:00
1605408848373-clip-description.js fix migrations 2022-03-01 00:07:03 +09:00
1605408971051-comments.js fix migrations 2022-03-01 00:07:03 +09:00
1605585339718-instance-pinned-pages.js fix migrations 2022-03-01 00:07:03 +09:00
1605965516823-instance-images.js fix migrations 2022-03-01 00:07:03 +09:00
1606191203881-no-crawle.js fix migrations 2022-03-01 00:07:03 +09:00
1607151207216-instance-pinned-clip.js fix migrations 2022-03-01 00:07:03 +09:00
1607353487793-isExplorable.js fix migrations 2022-03-01 00:07:03 +09:00
1610277136869-registry.js fix migrations 2022-03-01 00:07:03 +09:00
1610277585759-registry2.js fix migrations 2022-03-01 00:07:03 +09:00
1610283021566-registry3.js fix migrations 2022-03-01 00:07:03 +09:00
1611354329133-followersUri.js fix migrations 2022-03-01 00:07:03 +09:00
1611397665007-gallery.js fix migrations 2022-03-01 00:07:03 +09:00
1611547387175-objectStorageS3ForcePathStyle.js fix migrations 2022-03-01 00:07:03 +09:00
1612619156584-announcement-email.js fix migrations 2022-03-01 00:07:03 +09:00
1613155914446-emailNotificationTypes.js fix migrations 2022-03-01 00:07:03 +09:00
1613181457597-user-lang.js fix migrations 2022-03-01 00:07:03 +09:00
1613503367223-use-bigint-for-driveUsage.js fix migrations 2022-03-01 00:07:03 +09:00
1615965918224-chart-v2.js fix migrations 2022-03-01 00:07:03 +09:00
1615966519402-chart-v2-2.js fix migrations 2022-03-01 00:07:03 +09:00
1618637372000-user-last-active-date.js fix migrations 2022-03-01 00:07:03 +09:00
1618639857000-user-hide-online-status.js fix migrations 2022-03-01 00:07:03 +09:00
1619942102890-password-reset.js fix migrations 2022-03-01 00:07:03 +09:00
1620019354680-ad.js fix migrations 2022-03-01 00:07:03 +09:00
1620364649428-ad2.js fix migrations 2022-03-01 00:07:03 +09:00
1621479946000-add-note-indexes.js fix migrations 2022-03-01 00:07:03 +09:00
1622679304522-user-profile-description-length.js fix migrations 2022-03-01 00:07:03 +09:00
1622681548499-log-message-length.js fix migrations 2022-03-01 00:07:03 +09:00
1626509500668-fix-remote-file-proxy.js fix migrations 2022-03-01 00:07:03 +09:00
1629004542760-chart-reindex.js fix migrations 2022-03-01 00:07:03 +09:00
1629024377804-deepl-integration.js fix migrations 2022-03-01 00:07:03 +09:00
1629288472000-fix-channel-userId.js fix migrations 2022-03-01 00:07:03 +09:00
1629512953000-user-is-deleted.js fix migrations 2022-03-01 00:07:03 +09:00
1629778475000-deepl-integration2.js fix migrations 2022-03-01 00:07:03 +09:00
1629833361000-AddShowTLReplies.js fix migrations 2022-03-01 00:07:03 +09:00
1629968054000_userInstanceBlocks.js fix migrations 2022-03-01 00:07:03 +09:00
1633068642000-email-required-for-signup.js fix migrations 2022-03-01 00:07:03 +09:00
1633071909016-user-pending.js fix migrations 2022-03-01 00:07:03 +09:00
1634486652000-user-public-reactions.js fix migrations 2022-03-01 00:07:03 +09:00
1634902659689-delete-log.js fix migrations 2022-03-01 00:07:03 +09:00
1635500777168-note-thread-mute.js fix migrations 2022-03-01 00:07:03 +09:00
1636197624383-ff-visibility.js fix migrations 2022-03-01 00:07:03 +09:00
1636697408073-remove-via-mobile.js fix migrations 2022-03-01 00:07:03 +09:00
1637320813000-forwarded-report.js fix migrations 2022-03-01 00:07:03 +09:00
1639325650583-chart-v3.js fix migrations 2022-03-01 00:07:03 +09:00
1642611822809-emoji-url.js fix migrations 2022-03-01 00:07:03 +09:00
1642613870898-drive-file-webpublic-type.js fix migrations 2022-03-01 00:07:03 +09:00
1643963705770-chart-v4.js fix migrations 2022-03-01 00:07:03 +09:00
1643966656277-chart-v5.js fix migrations 2022-03-01 00:07:03 +09:00
1643967331284-chart-v6.js fix migrations 2022-03-01 00:07:03 +09:00
1644010796173-convert-hard-mutes.js fix migrations 2022-03-01 00:07:03 +09:00
1644058404077-chart-v7.js fix migrations 2022-03-01 00:07:03 +09:00
1644059847460-chart-v8.js fix migrations 2022-03-01 00:07:03 +09:00
1644060125705-chart-v9.js fix migrations 2022-03-01 00:07:03 +09:00
1644073149413-chart-v10.js fix migrations 2022-03-01 00:07:03 +09:00
1644095659741-chart-v11.js fix migrations 2022-03-01 00:07:03 +09:00
1644328606241-chart-v12.js fix migrations 2022-03-01 00:07:03 +09:00
1644331238153-chart-v13.js fix migrations 2022-03-01 00:07:03 +09:00
1644344266289-chart-v14.js fix migrations 2022-03-01 00:07:03 +09:00
1644395759931-instance-theme-color.js fix migrations 2022-03-01 00:07:03 +09:00
1644481657998-chart-v15.js fix migrations 2022-03-01 00:07:03 +09:00
1644551208096-following-indexes.js fix migrations 2022-03-01 00:07:03 +09:00
1645340161439-remove-max-note-text-length.js fix migrations 2022-03-01 00:07:03 +09:00
1645599900873-federation-chart-pubsub.js fix migrations 2022-03-01 00:07:03 +09:00
1646143552768-instance-default-theme.js feat: instance default theme 2022-03-01 23:58:01 +09:00
1646387162108-mute-expires-at.js feat: 時限ミュート 2022-03-04 20:23:53 +09:00
1646549089451-poll-ended-notification.js feat: アンケート終了通知 2022-03-06 16:06:27 +09:00
1646633030285-chart-federation-active.js feat: add active to federation chart 2022-03-07 15:10:16 +09:00
1646655454495-remove-instance-drive-columns.js delete needless instance drive columns 2022-03-07 21:20:14 +09:00
1646732390560-chart-federation-active-sub-pub.js fix federation chart 2022-03-08 22:56:46 +09:00
1648548247382-webhook.js feat: Webhook (#8457) 2022-04-02 15:28:49 +09:00
1648816172177-webhook-2.js feat: Webhook (#8457) 2022-04-02 15:28:49 +09:00
1651224615271-foreign-key.js Update 1651224615271-foreign-key.js 2022-07-17 05:12:59 +09:00
1652859567549-uniform-themecolor.js hotfix: uniform color migration fix 2022-05-19 15:42:55 +02:00
1655368940105-nsfw-detection.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1655371960534-nsfw-detection-2.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1655388169582-nsfw-detection-3.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1655393015659-nsfw-detection-4.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1655813815729-driveCapacityOverrideMb.js Add additional drive capacity change support (#8867) 2022-07-05 00:21:01 +09:00
1655918165614-user-ip.js feat: Log user ips (#8872) 2022-07-02 15:12:11 +09:00
1656122560740-file-ip.js feat: Log user ips (#8872) 2022-07-02 15:12:11 +09:00
1656251734807-nsfw-detection-5.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1656328812281-ip-2.js feat: Log user ips (#8872) 2022-07-02 15:12:11 +09:00
1656408772602-nsfw-detection-6.js feat: auto nsfw detection (#8840) 2022-07-07 21:06:37 +09:00
1656772790599-user-moderation-note.js feat: moderation note 2022-07-03 00:15:03 +09:00
1657346559800-active-email-validation.js enhance: make active email validation configurable 2022-07-09 15:05:55 +09:00
1664694635394-turnstile.js Add Cloudflare Turnstile CAPTCHA support (#9111) 2022-10-13 09:19:57 +09:00
1665091090561-add-renote-muting.js feat: Per-user renote mute (#10249) 2023-03-08 08:56:09 +09:00
1669138716634-whetherPushNotifyToSendReadMessage.js enhance: Implement the toggle to (or not to) close push notifications when notifications or messages are read (#9219) 2022-12-18 01:59:59 +09:00
1671924750884-RetentionAggregation.js feat: introduce retention-rate aggregation 2022-12-25 09:09:46 +09:00
1671926422832-RetentionAggregation2.js feat: introduce retention-rate aggregation 2022-12-25 09:09:46 +09:00
1672562400597-PerUserPvChart.js feat: add per user pv chart 2023-01-01 17:45:49 +09:00
1672703171386-remove-latestRequestSentAt.js drop latestRequestSentAt of instance 2023-01-03 08:48:00 +09:00
1672704017999-remove-lastCommunicatedAt.js drop lastCommunicatedAt of instance 2023-01-03 09:00:42 +09:00
1672704136584-remove-latestStatus.js drop latestStatus of instance 2023-01-03 09:03:04 +09:00
1672822262496-Flash.js MisskeyPlay (#9467) 2023-01-05 13:59:48 +09:00
1673336077243-PollChoiceLength.js enhance(server): アンケート選択肢の文字数制限を緩和 2023-01-10 16:41:38 +09:00
1673500412259-Role.js Role (#9437) 2023-01-12 21:02:26 +09:00
1673515526953-RoleColor.js Role (#9437) 2023-01-12 21:02:26 +09:00
1673522856499-RoleIroiro.js Role (#9437) 2023-01-12 21:02:26 +09:00
1673524604156-RoleLastUsedAt.js Role (#9437) 2023-01-12 21:02:26 +09:00
1673570377815-RoleConditional.js feat: conditional role 2023-01-13 11:03:54 +09:00
1673575973645-MetaClean.js remoteDriveCapacityMbをロールに統合 2023-01-13 11:14:07 +09:00
1673783015567-Policies.js refactor: rename role.options -> role.policies 2023-01-15 20:52:53 +09:00
1673812883772-firstRetrievedAt.js refactor: rename instance.caughtAt to instance.firstRetrievedAt 2023-01-16 05:02:38 +09:00
1674086433654-flashScriptLength.js enhance: playのscriptの文字数制限を緩和 2023-01-19 09:06:11 +09:00
1674118260469-achievement.js Achievements (#9665) 2023-01-21 13:14:55 +09:00
1674255666603-loggedInDates.js Achievements (#9665) 2023-01-21 13:14:55 +09:00
1675053125067-fixforeignkeyreports.js Fix: foreignkey on reports (#9753) 2023-03-19 15:46:24 +09:00
1675404035646-cleanup.js Create 1675404035646-cleanup.js 2023-02-03 15:02:54 +09:00
1675557528704-role-icon-badge.js feat: ロールにアイコンを設定してユーザー名の横に表示できるように 2023-02-05 10:37:03 +09:00
1676434944993-drop-group.js fix(server): 全ての通知が削除されてしまうのを修正 2023-02-23 14:01:18 +00:00
1676438468213-ad3.js マイグレーションファイルの変更ミス (#10029) 2023-02-23 07:52:01 +09:00
1677570181236-role-assignment-expires-at.js feat: 時限ロール (#10145) 2023-03-01 10:20:03 +09:00
1678164627293-per-note-reaction-acceptance.js feat: Reaction acceptance (#10256) 2023-03-08 08:56:47 +09:00
1678426061773-tweak-varchar-length.js tweak postgresql entities 2023-03-10 14:53:56 +09:00
1678427401214-remove-unused.js tweak postgresql entities 2023-03-10 14:53:56 +09:00
1678602320354-role-display-order.js enhance: ロールの並び順を設定可能に 2023-03-12 16:38:08 +09:00
1678694614599-sensitive-words.js feat: sensitive word 2023-03-13 17:37:22 +09:00
1678869617549-retention-date-key.js fix: tweak retention rate aggregation 2023-03-15 17:43:13 +09:00
1678945242650-add-props-for-custom-emoji.js enhance: カスタム絵文字にライセンス情報を付与できるように 2023-03-16 15:08:48 +09:00
1678953978856-clip-favorite.js feat: clip favorite 2023-03-16 17:24:49 +09:00
1679309757174-antenna-active.js enhance: 使われてないアンテナは自動停止されるように 2023-03-20 20:12:38 +09:00
1679639483253-enableChartsForRemoteUser.js enhance(backend): リモートユーザーのチャート生成を無効にするオプションを追加 2023-03-24 15:43:36 +09:00
1679651580149-cleanup.js enhance(backend): use ❤️ for reaction fallback 2023-03-24 18:55:31 +09:00
1679652081809-enableChartsForFederatedInstances.js enhance(backend): リモートサーバーのチャート生成を無効にするオプションを追加 2023-03-24 19:08:08 +09:00
1680228513388-channelFavorite.js feat: チャンネルをお気に入りに登録できるように 2023-03-31 11:30:27 +09:00
1680238118084-channelNotePining.js feat: チャンネルにノートをピン留めできるように 2023-03-31 15:01:56 +09:00
1680491187535-cleanup.js perf(backend): store notes of an antenna to redis instead of postgresql 2023-04-03 12:11:16 +09:00
1680582195041-cleanup.js perf(backend): 通知をRedisに保存するように 2023-04-04 14:06:57 +09:00
1680702787050-UserMemo.js feat: 自分用メモ機能 (#10516) 2023-04-13 13:17:32 +09:00
1680775031481-avatar-url-and-banner-url.js perf(backend): cache avatar and banner url to db 2023-04-06 19:48:24 +09:00
1680931179228-account-move.js Create 1680931179228-account-move.js 2023-04-08 14:20:40 +09:00
1681400427971-serverRules.js feat: Server rules (#10660) 2023-04-19 21:24:31 +09:00
1681870960239-RoleTLSetting.js Role timeline setting (#10677) 2023-04-20 20:02:50 +09:00
1682190963894-movedAt.js enhance: account migration (#10592) 2023-04-30 00:09:29 +09:00
1682754135458-preservedUsernames.js feat: preserved usernames 2023-04-29 17:03:14 +09:00