Skip to content

Commit deb0858

Browse files
authored
chore(db): remove unused table and unused route (#2342)
1 parent dda44f7 commit deb0858

File tree

7 files changed

+7725
-90
lines changed

7 files changed

+7725
-90
lines changed

apps/sim/app/api/workflows/public/[id]/route.ts

Lines changed: 0 additions & 69 deletions
This file was deleted.

apps/sim/app/api/workspaces/[id]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ export async function DELETE(
246246
logger.info(`Deleted templates for workflows in workspace ${workspaceId}`)
247247
} else {
248248
// Set workflowId to null for templates to create "orphaned" templates
249-
// This allows templates to remain in marketplace but without source workflows
249+
// This allows templates to remain without source workflows
250250
await tx
251251
.update(templates)
252252
.set({ workflowId: null })
@@ -260,7 +260,7 @@ export async function DELETE(
260260
// Delete all workflows in the workspace - database cascade will handle all workflow-related data
261261
// The database cascade will handle deleting related workflow_blocks, workflow_edges, workflow_subflows,
262262
// workflow_logs, workflow_execution_snapshots, workflow_execution_logs, workflow_execution_trace_spans,
263-
// workflow_schedule, webhook, marketplace, chat, and memory records
263+
// workflow_schedule, webhook, chat, and memory records
264264
await tx.delete(workflow).where(eq(workflow.workspaceId, workspaceId))
265265

266266
// Clear workspace ID from knowledge bases instead of deleting them

apps/sim/stores/workflows/registry/store.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ export const useWorkflowRegistry = create<WorkflowRegistry>()(
508508
color: getNextWorkflowColor(),
509509
workspaceId, // Include the workspaceId in the new workflow
510510
folderId: sourceWorkflow.folderId, // Include the folderId from source workflow
511-
// Do not copy marketplace data
512511
}
513512

514513
// Get the current workflow state to copy from
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE "marketplace" CASCADE;

0 commit comments

Comments
 (0)