Skip to content

Commit c020e89

Browse files
committed
Make it woooooooork
1 parent 9b95c5b commit c020e89

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

components/gitpod-db/src/typeorm/entity/db-team-settings.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
* See License.AGPL.txt in the project root for license information.
55
*/
66

7-
import { OrgMemberRole, OrganizationSettings, RoleRestrictions, TimeoutSettings } from "@gitpod/gitpod-protocol";
7+
import {
8+
OnboardingSettings,
9+
OrgMemberRole,
10+
OrganizationSettings,
11+
RoleRestrictions,
12+
TimeoutSettings,
13+
} from "@gitpod/gitpod-protocol";
814
import { Entity, Column, PrimaryColumn } from "typeorm";
915
import { TypeORM } from "../typeorm";
1016

@@ -42,6 +48,9 @@ export class DBOrgSettings implements OrganizationSettings {
4248
@Column({ type: "int", default: 0 })
4349
maxParallelRunningWorkspaces: number;
4450

51+
@Column("json", { nullable: true })
52+
onboardingSettings?: OnboardingSettings | undefined;
53+
4554
@Column()
4655
deleted: boolean;
4756
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Copyright (c) 2025 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 { columnExists } from "./helper/helper";
9+
10+
const table = "d_b_org_settings";
11+
const newColumn = "onboardingSettings";
12+
13+
export class AddOrgOnboardingSettings1736261239285 implements MigrationInterface {
14+
public async up(queryRunner: QueryRunner): Promise<void> {
15+
if (!(await columnExists(queryRunner, table, newColumn))) {
16+
await queryRunner.query(`ALTER TABLE ${table} ADD COLUMN ${newColumn} JSON NULL`);
17+
}
18+
}
19+
20+
public async down(queryRunner: QueryRunner): Promise<void> {
21+
if (await columnExists(queryRunner, table, newColumn)) {
22+
await queryRunner.query(`ALTER TABLE ${table} DROP COLUMN ${newColumn}`);
23+
}
24+
}
25+
}

components/gitpod-db/src/typeorm/team-db-impl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ export class TeamDBImpl extends TransactionalDBImpl<TeamDB> implements TeamDB {
375375
"timeoutSettings",
376376
"roleRestrictions",
377377
"maxParallelRunningWorkspaces",
378+
"onboardingSettings",
378379
],
379380
});
380381
}

0 commit comments

Comments
 (0)