diff --git a/front/lib/models/workspace.ts b/front/lib/models/workspace.ts index bb26deda6590..38dbc05de047 100644 --- a/front/lib/models/workspace.ts +++ b/front/lib/models/workspace.ts @@ -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; } Workspace.init( @@ -64,9 +62,6 @@ Workspace.init( allowedDomain: { type: DataTypes.STRING, }, - plan: { - type: DataTypes.STRING, - }, }, { modelName: "workspace", diff --git a/front/migrations/20230919_workspace_upgraded_at.ts b/front/migrations/20230919_workspace_upgraded_at.ts index 2be46bb0c7d0..dcea381e0825 100644 --- a/front/migrations/20230919_workspace_upgraded_at.ts +++ b/front/migrations/20230919_workspace_upgraded_at.ts @@ -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, }, diff --git a/front/migrations/20231113_remove_plan_column.sql b/front/migrations/20231113_remove_plan_column.sql new file mode 100644 index 000000000000..a1d35444eda6 --- /dev/null +++ b/front/migrations/20231113_remove_plan_column.sql @@ -0,0 +1 @@ +ALTER TABLE "workspaces" DROP COLUMN "plan";