refactor(server): drop salt column (#1185)

This commit is contained in:
Jason Rasmussen 2022-12-26 23:03:14 -05:00 committed by GitHub
parent 0c896d9e59
commit 4e860b024b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 25 deletions

View file

@ -21,9 +21,6 @@ export class UserEntity {
@Column({ default: '', select: false })
password?: string;
@Column({ default: '', select: false })
salt?: string;
@Column({ default: '' })
oauthId!: string;

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class DropSaltColumn1672109862870 implements MigrationInterface {
name = 'DropSaltColumn1672109862870'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "salt"`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" ADD "salt" character varying NOT NULL DEFAULT ''`);
}
}