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
This commit is contained in:
anatawa12
2025-07-16 15:49:05 +09:00
committed by GitHub
parent ad7bf096e1
commit 6f6fdfe28e
21 changed files with 228 additions and 19 deletions

View File

@@ -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,