summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/Note.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/models/Note.ts')
-rw-r--r--packages/backend/src/models/Note.ts13
1 files changed, 5 insertions, 8 deletions
diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts
index 2705282880..b11e2ec62b 100644
--- a/packages/backend/src/models/Note.ts
+++ b/packages/backend/src/models/Note.ts
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
@@ -11,9 +11,6 @@ import { MiChannel } from './Channel.js';
import type { MiDriveFile } from './DriveFile.js';
@Entity('note')
-@Index('IDX_NOTE_TAGS', { synchronize: false })
-@Index('IDX_NOTE_MENTIONS', { synchronize: false })
-@Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
export class MiNote {
@PrimaryColumn(id())
public id: string;
@@ -139,7 +136,7 @@ export class MiNote {
})
public url: string | null;
- @Index()
+ @Index('IDX_NOTE_FILE_IDS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
@@ -151,14 +148,14 @@ export class MiNote {
})
public attachedFileTypes: string[];
- @Index()
+ @Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
})
public visibleUserIds: MiUser['id'][];
- @Index()
+ @Index('IDX_NOTE_MENTIONS', { synchronize: false })
@Column({
...id(),
array: true, default: '{}',
@@ -180,7 +177,7 @@ export class MiNote {
})
public emojis: string[];
- @Index()
+ @Index('IDX_NOTE_TAGS', { synchronize: false })
@Column('varchar', {
length: 128, array: true, default: '{}',
})