Dropping a database column in a Rails app without downtime requires care due to ActiveRecord's schema caching. When a migration removes a column before the app restarts, the old process still serves traffic with a cached schema that includes the dropped column, causing query errors. Rails' `ignored_columns` feature solves this by making ActiveRecord pretend the column doesn't exist before it's physically removed. The safe approach is a two-step deploy: first add the column to `ignored_columns` and deploy, then run the migration to drop it. For columns holding critical data that must be migrated elsewhere, a multi-step process involving backfilling, dual-writing, ignoring, and finally dropping is recommended. The post also explains the internal implementation of `ignored_columns`, including schema cache invalidation and STI inheritance behavior.
Sort: