From 6f6fdfe28e3638e09ee1452fd2a8bb4271e1d0ce Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Wed, 16 Jul 2025 15:49:05 +0900 Subject: 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 --- packages/backend/src/models/NoteDraft.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packages/backend/src/models/NoteDraft.ts') diff --git a/packages/backend/src/models/NoteDraft.ts b/packages/backend/src/models/NoteDraft.ts index 39d85e53dc..6483748bc2 100644 --- a/packages/backend/src/models/NoteDraft.ts +++ b/packages/backend/src/models/NoteDraft.ts @@ -12,11 +12,13 @@ import { MiNote } from './Note.js'; import type { MiDriveFile } from './DriveFile.js'; @Entity('note_draft') +@Index('IDX_NOTE_DRAFT_FILE_IDS', { synchronize: false }) // GIN for fileIds in production +@Index('IDX_NOTE_DRAFT_VISIBLE_USER_IDS', { synchronize: false }) // GIN for visibleUserIds in production export class MiNoteDraft { @PrimaryColumn(id()) public id: string; - @Index() + @Index('IDX_NOTE_DRAFT_REPLY_ID') @Column({ ...id(), nullable: true, @@ -31,7 +33,7 @@ export class MiNoteDraft { @JoinColumn() public reply: MiNote | null; - @Index() + @Index('IDX_NOTE_DRAFT_RENOTE_ID') @Column({ ...id(), nullable: true, @@ -57,7 +59,7 @@ export class MiNoteDraft { }) public cw: string | null; - @Index() + @Index('IDX_NOTE_DRAFT_USER_ID') @Column({ ...id(), comment: 'The ID of author.', @@ -108,7 +110,7 @@ export class MiNoteDraft { }) public hashtag: string | null; - @Index() + @Index('IDX_NOTE_DRAFT_CHANNEL_ID') @Column({ ...id(), nullable: true, -- cgit v1.2.3-freya