Skip to content

Commit 8ca89f7

Browse files
[Front] Cleaning: Remove plan column from workspace table (#2510)
Related [task](dust-tt/tasks#200)
1 parent 526e943 commit 8ca89f7

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

front/lib/models/workspace.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ export class Workspace extends Model<
2525
declare name: string;
2626
declare description: string | null;
2727
declare allowedDomain: string | null;
28-
declare plan: string | null;
29-
3028
declare subscriptions: NonAttribute<Subscription[]>;
3129
}
3230
Workspace.init(
@@ -64,9 +62,6 @@ Workspace.init(
6462
allowedDomain: {
6563
type: DataTypes.STRING,
6664
},
67-
plan: {
68-
type: DataTypes.STRING,
69-
},
7065
},
7166
{
7267
modelName: "workspace",

front/migrations/20230919_workspace_upgraded_at.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import { Workspace } from "@app/lib/models";
44

55
async function main() {
66
console.log("Fetching Upgraded Worspaces...");
7+
// @ts-expect-error no plan column anymore
78
const workspaces = await Workspace.findAll({
89
where: {
10+
// @ts-expect-error no plan column anymore
911
plan: {
1012
[Op.not]: null,
1113
},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE "workspaces" DROP COLUMN "plan";

0 commit comments

Comments
 (0)