Passed
Push — master ( 8b3289...60a814 )
by
unknown
02:03
created

server/migrations/1687946137748-removeBillable.ts   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 14
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 14
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

2 Functions

Rating   Name   Duplication   Size   Complexity  
A RemoveBillable1687946137748.up 0 3 1
A RemoveBillable1687946137748.down 0 3 1
1
import { MigrationInterface, QueryRunner } from "typeorm";
2
3
export class RemoveBillable1687946137748 implements MigrationInterface {
4
    name = 'RemoveBillable1687946137748'
5
6
    public async up(queryRunner: QueryRunner): Promise<void> {
7
        await queryRunner.query(`ALTER TABLE "event" DROP COLUMN "billable"`);
8
    }
9
10
    public async down(queryRunner: QueryRunner): Promise<void> {
11
        await queryRunner.query(`ALTER TABLE "event" ADD "billable" boolean NOT NULL DEFAULT true`);
12
    }
13
}
14