diff --git a/packages/auth/migrations/1672223738686-add_authenticators.ts b/packages/auth/migrations/1672223738686-add_authenticators.ts index b8ff590c9..50d1091d3 100644 --- a/packages/auth/migrations/1672223738686-add_authenticators.ts +++ b/packages/auth/migrations/1672223738686-add_authenticators.ts @@ -5,12 +5,11 @@ export class addAuthenticators1672223738686 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { await queryRunner.query( - 'CREATE TABLE `authenticators` (`uuid` varchar(36) NOT NULL, `user_uuid` varchar(36) NOT NULL, `credential_id` varbinary(1024) NOT NULL, `credential_public_key` blob NOT NULL, `counter` bigint NOT NULL, `credential_device_type` varchar(32) NOT NULL, `credential_backed_up` tinyint NOT NULL, `transports` varchar(255) NULL, `created_at` bigint NOT NULL, `updated_at` bigint NOT NULL, UNIQUE INDEX `credential_id` (`credential_id`), PRIMARY KEY (`uuid`)) ENGINE=InnoDB', + 'CREATE TABLE `authenticators` (`uuid` varchar(36) NOT NULL, `user_uuid` varchar(36) NOT NULL, `credential_id` varbinary(1024) NOT NULL, `credential_public_key` blob NOT NULL, `counter` bigint NOT NULL, `credential_device_type` varchar(32) NOT NULL, `credential_backed_up` tinyint NOT NULL, `transports` varchar(255) NULL, `created_at` bigint NOT NULL, `updated_at` bigint NOT NULL, PRIMARY KEY (`uuid`)) ENGINE=InnoDB', ) } public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('DROP INDEX `credential_id` ON `authenticators`') - await queryRunner.query('DROP TABLE `authenticators`') + await queryRunner.query('DROP TABLE `authentticators`') } } diff --git a/packages/auth/migrations/1672232948685-fix_authenticator_indexing.ts b/packages/auth/migrations/1672232948685-fix_authenticator_indexing.ts deleted file mode 100644 index 599ea6fb5..000000000 --- a/packages/auth/migrations/1672232948685-fix_authenticator_indexing.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm' - -export class fixAuthenticatorIndexing1672232948685 implements MigrationInterface { - name = 'fixAuthenticatorIndexing1672232948685' - - public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query('DROP INDEX `credential_id` ON `authenticators`') - } - - public async down(queryRunner: QueryRunner): Promise { - await queryRunner.query('CREATE UNIQUE INDEX `credential_id` ON `authenticators` (`credential_id`)') - } -}