diff options
| author | anatawa12 <anatawa12@icloud.com> | 2025-07-16 15:49:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 15:49:05 +0900 |
| commit | 6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce (patch) | |
| tree | ee61252eaa0aa57ec4fc7b380b6637549c624af0 /packages/backend/src/models/AbuseReportNotificationRecipient.ts | |
| parent | enhance(backend): usernameに対してもprohibitedWordsForNameOfUserを適... (diff) | |
| download | misskey-6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce.tar.gz misskey-6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce.tar.bz2 misskey-6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce.zip | |
Migration cleanup (#16288)
* chore: apply several @Index and @ManyToOne to match actual migration code
* chore: several decorator updates with typeorm bug workaround with patches
* feat: add final cleanup migration
* dev: add .editorconfig settings for generated migrations
* chore: update dockerfile to build package with patches
* chore: update federation test compose to include patches
* chore: revert few dependency update
* chore: don't check disableRegistration on test env
* test: add test for checking migration script
* chore: set proxyRemoteFiles true in test config
* chore: enter invitation code in signup test
* fix: register send button is not disabled when invitationCode is not input
Diffstat (limited to 'packages/backend/src/models/AbuseReportNotificationRecipient.ts')
| -rw-r--r-- | packages/backend/src/models/AbuseReportNotificationRecipient.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/packages/backend/src/models/AbuseReportNotificationRecipient.ts b/packages/backend/src/models/AbuseReportNotificationRecipient.ts index fbff880afc..17ec6abed5 100644 --- a/packages/backend/src/models/AbuseReportNotificationRecipient.ts +++ b/packages/backend/src/models/AbuseReportNotificationRecipient.ts @@ -22,7 +22,7 @@ export class MiAbuseReportNotificationRecipient { /** * 有効かどうか. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_isActive') @Column('boolean', { default: true, }) @@ -47,7 +47,7 @@ export class MiAbuseReportNotificationRecipient { /** * 通知方法. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_method') @Column('varchar', { length: 64, }) @@ -56,10 +56,11 @@ export class MiAbuseReportNotificationRecipient { /** * 通知先のユーザID. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_userId') @Column({ ...id(), nullable: true, + default: null, }) public userId: MiUser['id'] | null; @@ -75,17 +76,20 @@ export class MiAbuseReportNotificationRecipient { /** * 通知先のユーザプロフィール. */ - @ManyToOne(type => MiUserProfile, {}) + @ManyToOne(type => MiUserProfile, { + onDelete: 'CASCADE', + }) @JoinColumn({ name: 'userId', referencedColumnName: 'userId', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_userId2' }) public userProfile: MiUserProfile | null; /** * 通知先のシステムWebhookId. */ - @Index() + @Index('IDX_abuse_report_notification_recipient_systemWebhookId') @Column({ ...id(), nullable: true, + default: null, }) public systemWebhookId: string | null; @@ -95,6 +99,6 @@ export class MiAbuseReportNotificationRecipient { @ManyToOne(type => MiSystemWebhook, { onDelete: 'CASCADE', }) - @JoinColumn() + @JoinColumn({ name: 'systemWebhookId', referencedColumnName: 'id', foreignKeyConstraintName: 'FK_abuse_report_notification_recipient_systemWebhookId' }) public systemWebhook: MiSystemWebhook | null; } |