Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • remove unused table and unused route

Type of Change

  • Other: Cleanup

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Dec 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 13, 2025 0:53am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 13, 2025

Greptile Overview

Greptile Summary

This PR removes the unused marketplace table and its associated API endpoint. The changes include:

  • Dropped the marketplace database table via migration with CASCADE to remove all foreign key dependencies
  • Removed the marketplace table definition from packages/db/schema.ts
  • Deleted the entire /api/workflows/public/[id] route that was the only consumer of the marketplace table
  • Updated comments in workspace deletion logic to remove references to marketplace
  • Removed obsolete comment about marketplace data in workflow duplication

The cleanup is thorough and complete - verified no remaining references to the marketplace table or public workflow endpoint exist in the TypeScript codebase.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The cleanup is comprehensive and correct. All references to the removed table have been properly eliminated, the migration uses CASCADE to handle dependencies, and no active code paths reference the deleted functionality. This is a straightforward deletion of unused code.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/db/migrations/0122_pale_absorbing_man.sql 5/5 Drops marketplace table with CASCADE to remove all dependencies
packages/db/schema.ts 5/5 Removes marketplace table definition from database schema
apps/sim/app/api/workflows/public/[id]/route.ts 5/5 Deletes unused public workflow API endpoint that queried marketplace table
apps/sim/app/api/workspaces/[id]/route.ts 5/5 Updates comment to remove marketplace from cascade deletion list

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Migration as DB Migration
    participant Schema as Schema Definition
    participant API as API Routes
    participant Comments as Code Comments
    
    Dev->>Schema: Remove marketplace table export
    Dev->>Migration: Create DROP TABLE migration
    Migration->>Migration: DROP TABLE "marketplace" CASCADE
    Note over Migration: Removes table and all FK dependencies
    
    Dev->>API: Delete /api/workflows/public/[id]
    Note over API: Removes only consumer of marketplace table
    
    Dev->>Comments: Update workspace deletion comment
    Note over Comments: Remove "marketplace" from cascade list
    
    Dev->>Comments: Remove obsolete workflow store comment
    Note over Comments: Delete "Do not copy marketplace data"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit deb0858 into staging Dec 13, 2025
10 checks passed
@waleedlatif1 waleedlatif1 deleted the chore/db branch December 13, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants