make migration plain JS

This commit is contained in:
Norm 2022-11-10 12:52:32 -05:00
parent 9c9b5bb44c
commit a499c364d6
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 12 additions and 14 deletions

View file

@ -0,0 +1,12 @@
export class userBlockFederation1631880003000 {
name = 'userBlockFederation1631880003000';
public async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" ADD "federateBlocks" boolean NOT NULL DEFAULT true`);
}
public async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "federateBlocks"`);
}
}

View file

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