Skip to content

Commit a008dff

Browse files
committed
[db] Drop table d_b_pending_github_event
1 parent 912f6b2 commit a008dff

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

components/gitpod-db/src/tables.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,6 @@ export class GitpodTableDescriptionProvider implements TableDescriptionProvider
6363
primaryKeys: ["id"],
6464
timeColumn: "_lastModified",
6565
},
66-
{
67-
name: "d_b_pending_github_event",
68-
primaryKeys: ["id"],
69-
timeColumn: "creationDate",
70-
deletionColumn: "deleted",
71-
},
7266
{
7367
name: "d_b_volume_snapshot",
7468
primaryKeys: ["id"],
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2023 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+
9+
export class DropPendingGitHubEvents1681829127935 implements MigrationInterface {
10+
public async up(queryRunner: QueryRunner): Promise<void> {
11+
await queryRunner.query("DROP TABLE IF EXISTS `d_b_pending_github_event`");
12+
}
13+
14+
public async down(queryRunner: QueryRunner): Promise<void> {
15+
await queryRunner.query(
16+
`CREATE TABLE IF NOT EXISTS d_b_pending_github_event ( id char(36) NOT NULL, githubUserId varchar(36) NOT NULL, creationDate timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), type varchar(128) NOT NULL, event text, deleted tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4`,
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)