Skip to content

Commit d51dc0b

Browse files
easyCZroboquat
authored andcommitted
[db] Drop d_b_billed_session table
1 parent 9bc9303 commit d51dc0b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3+
* Licensed under the GNU Affero General Public License (AGPL).
4+
* See License-AGPL.txt in the project root for license information.
5+
*/
6+
7+
import { MigrationInterface, QueryRunner } from "typeorm";
8+
import { tableExists } from "./helper/helper";
9+
10+
export class DropBilledSessionTable1663572136760 implements MigrationInterface {
11+
public async up(queryRunner: QueryRunner): Promise<void> {
12+
const TABLE_NAME = "d_b_billed_session";
13+
if (await tableExists(queryRunner, TABLE_NAME)) {
14+
await queryRunner.query(`DROP TABLE \`${TABLE_NAME}\``);
15+
}
16+
}
17+
18+
public async down(queryRunner: QueryRunner): Promise<void> {}
19+
}

components/gitpod-db/src/typeorm/migration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To create a new migration file, run this command in the `gitpod-db` component directory:
44

55
```
6-
yarn typeorm migrations:create -n NameOfYourMigration
6+
yarn typeorm migration:create -n NameOfYourMigration
77
leeway run components:update-license-header
88
```
99

0 commit comments

Comments
 (0)