Skip to content

HOLD: Delete legacy migration code and unused files#1290

Open
maebeale wants to merge 4 commits intomainfrom
maebeale/delete-old-code
Open

HOLD: Delete legacy migration code and unused files#1290
maebeale wants to merge 4 commits intomainfrom
maebeale/delete-old-code

Conversation

@maebeale
Copy link
Collaborator

@maebeale maebeale commented Mar 1, 2026

What is the goal of this PR and why is this important?

  • Remove accumulated one-time migration artifacts, dead code, and stale files to reduce codebase clutter and confusion

How did you approach the change?

  • Deleted 14 one-time rake tasks (Paperclip→ActiveStorage, asset migrations, rich text URL rewrites, data backfills, tag deduping, story generation, etc.)
  • Removed kt-paperclip gem and its initializer — no models use Paperclip anymore
  • Deleted dead models: ReportStory (marked TODO for removal), ThumbnailAsset (orphaned STI class)
  • Deleted image_migration_audit controller, view, and route
  • Deleted 5 old _old view templates (kept Devise ones for reference)
  • Deleted bin/backup-db.sh (hardcoded old server hostnames)
  • Deleted db/init/ SQL dumps (87MB+ of tracked binary data)
  • Deleted app/services/workshops_to_revert.json (5.3MB unreferenced data file)
  • Removed empty config/feature_flag_variables.rb and its load lines in dev/test environments (app uses feature_flipper gem instead)
  • Moved cloudinary_rows.csv from app/services/ to db/
  • Fixed check_feature_fagcheck_feature_flag typo in monthly_reports_controller.rb

Anything else to add?

  • app/services/rich_text_migrator.rb was kept intentionally — reusable for future Rhino field conversions
  • app/services/model_deduper.rb and Dedupable concern are actively used by controllers
  • db/archived/ (172 old migrations) left as-is — intentional archive
  • Net result: 36 files changed, 6 insertions, 3,755 deletions

🤖 Generated with Claude Code

maebeale and others added 4 commits March 1, 2026 16:30
Remove one-time rake tasks (Paperclip→ActiveStorage, asset migrations,
rich text URL rewrites, data backfills, tag deduping, etc.), dead models
(ReportStory, ThumbnailAsset), old _old view templates, image migration
audit controller, kt-paperclip gem/initializer, legacy backup script,
unused feature_flag_variables.rb, db/init SQL dumps, and stale data
files. Move cloudinary_rows.csv to db/. Fix check_feature_flag typo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove kt-paperclip and its orphaned dependencies (terrapin,
climate_control, mime-types, mime-types-data) from the lockfile
to fix CI frozen bundle check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Records in the database still have type "ReportStory" so the
class file must exist for Rails STI to load them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file loaded paperclip/matchers into RSpec, causing every
spec to fail after kt-paperclip was removed. No specs use
Paperclip matchers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale changed the title Delete legacy migration code and unused files HOLD: Delete legacy migration code and unused files Mar 1, 2026
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.

1 participant