forked from mirrors/misskey
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user