Skip to Content
Internal docs are powered by Nextra Docs Theme.
ProjectsLegacy data views removal

Legacy Data Views Removal Plan

Rails still contains an older data-view system built around views, view_columns, view_column_values, view_export_tasks, view_schedules, datasets, and dataset_fields. The current stored QA views live in api2 app_views, so the legacy Rails system can be removed as a planned cleanup rather than kept behind the Objects settings page.

Goal

Remove the legacy Rails data-view system and the dataset metadata tables without affecting api2 stored views, sheets, or field-based object attribute management.

Progress

  • Completed phase 1: removed the Rails legacy data-view routes, controllers, jobs, mailer, blueprints, policies, specs, and OpenAPI entries.
  • Completed phase 2: removed the legacy /data-views UI, the Rails-backed features/views client code, and the /views/view_* redirect to /data-views.
  • Completed the Objects UI cleanup from phase 3: Objects index/detail no longer call /datasets, and the orphaned dataset-field clients/components have been removed.

Remaining Dependencies

  • Sheet has legacy support for parent_type = "View" and view-schedule report delivery.
  • Database tables have foreign-key chains from datasets to dataset_fields, and from views to columns, custom values, schedules, exports, and sheet parents.

Phases

  1. Remove the Rails legacy data-view API surface: routes, controllers, jobs, mailer, blueprints, policies, and endpoint specs for views, view rows, view columns, view export tasks, view schedules, datasets, and dataset fields.
  2. Remove the legacy /data-views UI and features/views Rails-client code, while keeping api2 stored views under /views.
  3. Rewrite Objects detail away from /datasets/{id} so Interactions, Customers, Companies, and Employees use direct field endpoints.
  4. Clean up Sheet legacy view-parent and view-schedule behavior, including scheduled-report columns if they are no longer needed.
  5. Drop legacy tables with a migration in dependency order: view schedule/export/value/column tables first, then views, dataset fields, and datasets.
  6. Regenerate OpenAPI and generated web client types after each endpoint-removal phase that changes the Rails API contract.

Safety Notes

  • Do not delete api2.app_views; it backs current stored QA views.
  • Do not drop tables until all application references and queued jobs are removed or drained.
  • Check for existing sheets.parent_type = "View" and sheets.view_schedule_id rows before dropping view-related columns or tables.
  • Treat any customer-visible /data-views route removal as a navigation change and update the Instruct navigation guide when that phase lands.
Last updated on