Drop the `trending_projects` table
See #553408 (closed) for context
Step 3 of removing TrendingProjectsWorker. Drops the trending_projects table and its TrendingProject ActiveRecord model now that nothing writes to or reads from it.
Reference: https://docs.gitlab.com/development/database/avoiding_downtime_in_migrations/#dropping-tables
Prerequisite: #601483 (closed) must be merged and deployed.
Implementation Steps
-
Generate a post-deployment migration to drop the table:
rails g post_deployment_migration drop_trending_projects_tableIn the migration, use
drop_table :trending_projects. -
Delete
app/models/trending_project.rb. -
Delete
spec/models/trending_project_spec.rb(if it exists). -
Search for any remaining references to
TrendingProjectortrending_projectsand remove them (e.g. factory files, index definitions in schema).
Edited by Shane Maglangit