Skip to content

Commit

Permalink
Fix: user Approved index 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yunochi committed Oct 21, 2024
1 parent 73f0485 commit 04eb4bd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/backend/migration/1729528715258-Index_user_Approved.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class IndexUserApproved1729528715258 {
name = 'IndexUserApproved1729528715258';
async up(queryRunner) {
await queryRunner.query(`
CREATE INDEX "IDX_USER_APPROVED" ON "user" ("approved")
`);
}

async down(queryRunner) {
await queryRunner.query(`
DROP INDEX "public"."IDX_USER_APPROVED"
`);
}
}
1 change: 1 addition & 0 deletions packages/backend/src/models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export class MiUser {
})
public token: string | null;

@Index()
@Column('boolean', {
default: false,
})
Expand Down

0 comments on commit 04eb4bd

Please sign in to comment.