summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-04 16:50:06 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-04 16:50:06 +0900
commit55c14aec2c598af1ef3286573de28473f0960f9f (patch)
tree94625fddb2b4512b1e56a9a539615efc04a17a5b
parenttweak tl (diff)
downloadmisskey-55c14aec2c598af1ef3286573de28473f0960f9f.tar.gz
misskey-55c14aec2c598af1ef3286573de28473f0960f9f.tar.bz2
misskey-55c14aec2c598af1ef3286573de28473f0960f9f.zip
perf(backend): delete useless indexes
-rw-r--r--packages/backend/migration/1696405744672-clean-up.js18
-rw-r--r--packages/backend/src/models/Note.ts2
2 files changed, 18 insertions, 2 deletions
diff --git a/packages/backend/migration/1696405744672-clean-up.js b/packages/backend/migration/1696405744672-clean-up.js
new file mode 100644
index 0000000000..5ec89b08f4
--- /dev/null
+++ b/packages/backend/migration/1696405744672-clean-up.js
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and other misskey contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export class CleanUp1696405744672 {
+ name = 'CleanUp1696405744672'
+
+ async up(queryRunner) {
+ await queryRunner.query(`DROP INDEX "public"."IDX_e7c0567f5261063592f022e9b5"`);
+ await queryRunner.query(`DROP INDEX "public"."IDX_25dfc71b0369b003a4cd434d0b"`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`CREATE INDEX "IDX_25dfc71b0369b003a4cd434d0b" ON "note" ("attachedFileTypes") `);
+ await queryRunner.query(`CREATE INDEX "IDX_e7c0567f5261063592f022e9b5" ON "note" ("createdAt") `);
+ }
+}
diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts
index ed86d4549e..0d2422c4f3 100644
--- a/packages/backend/src/models/Note.ts
+++ b/packages/backend/src/models/Note.ts
@@ -18,7 +18,6 @@ export class MiNote {
@PrimaryColumn(id())
public id: string;
- @Index()
@Column('timestamp with time zone', {
comment: 'The created date of the Note.',
})
@@ -151,7 +150,6 @@ export class MiNote {
})
public fileIds: MiDriveFile['id'][];
- @Index()
@Column('varchar', {
length: 256, array: true, default: '{}',
})