Skip to content

Commit

Permalink
[Front] Cleaning: Remove plan column from workspace table (#2510)
Browse files Browse the repository at this point in the history
Related [task](dust-tt/tasks#200)
  • Loading branch information
philipperolet authored Nov 13, 2023
1 parent 526e943 commit 8ca89f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions front/lib/models/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export class Workspace extends Model<
declare name: string;
declare description: string | null;
declare allowedDomain: string | null;
declare plan: string | null;

declare subscriptions: NonAttribute<Subscription[]>;
}
Workspace.init(
Expand Down Expand Up @@ -64,9 +62,6 @@ Workspace.init(
allowedDomain: {
type: DataTypes.STRING,
},
plan: {
type: DataTypes.STRING,
},
},
{
modelName: "workspace",
Expand Down
2 changes: 2 additions & 0 deletions front/migrations/20230919_workspace_upgraded_at.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import { Workspace } from "@app/lib/models";

async function main() {
console.log("Fetching Upgraded Worspaces...");
// @ts-expect-error no plan column anymore
const workspaces = await Workspace.findAll({
where: {
// @ts-expect-error no plan column anymore
plan: {
[Op.not]: null,
},
Expand Down
1 change: 1 addition & 0 deletions front/migrations/20231113_remove_plan_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "workspaces" DROP COLUMN "plan";

0 comments on commit 8ca89f7

Please sign in to comment.