mirror of
https://github.com/standardnotes/server
synced 2026-09-28 09:13:16 -04:00
fix: add index to authenticators table
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddAuthenticatorsUserUuidIndex1778037105000 implements MigrationInterface {
|
||||
name = 'AddAuthenticatorsUserUuidIndex1778037105000'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query('CREATE INDEX `index_authenticators_on_user_uuid` ON `authenticators` (`user_uuid`)')
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query('DROP INDEX `index_authenticators_on_user_uuid` ON `authenticators`')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddAuthenticatorsUserUuidIndex1778037105000 implements MigrationInterface {
|
||||
name = 'AddAuthenticatorsUserUuidIndex1778037105000'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query('CREATE INDEX "index_authenticators_on_user_uuid" ON "authenticators" ("user_uuid")')
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query('DROP INDEX "index_authenticators_on_user_uuid"')
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
|
||||
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm'
|
||||
|
||||
@Entity({ name: 'authenticators' })
|
||||
export class TypeORMAuthenticator {
|
||||
@@ -9,6 +9,7 @@ export class TypeORMAuthenticator {
|
||||
name: 'user_uuid',
|
||||
length: 36,
|
||||
})
|
||||
@Index('index_authenticators_on_user_uuid')
|
||||
declare userUuid: string
|
||||
|
||||
@Column({
|
||||
|
||||
Reference in New Issue
Block a user