forked from FoundKeyGang/FoundKey
make migration plain JS
This commit is contained in:
parent
9c9b5bb44c
commit
a499c364d6
2 changed files with 12 additions and 14 deletions
|
@ -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"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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"`);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue