UncleGene
2012-Sep-23 14:46 UTC
How to remove column without downtime with ActiveRecord > 3.0?
Removing columns from tables while running application with ActiveRecord causes errors, because ActiveRecord caches column names. Workaround for ActiveRecord up to 3.0.9 was to override #columns method in the model and filter out deprecated column names before migration (basically - hide these columns from AR). This worked because all column name related methods were based on #columns call In ActiveRecord starting with 3.1.0 caching of table structures is moved to ConnectionPool, and all column name related values (e.g. coluumns_hash) are cached independently. Is there any way (other than deep-hack of concrete adapters) to achieve safe column drop in ActiveRecord > 3.0 ? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rIJ8E1fMimwJ. For more options, visit https://groups.google.com/groups/opt_out.
Apparently Analagous Threads
- How to use connection pool in Rails2.3.5 with WEBrick and MySQL?
- Upgrading dovecot 2.2 to 2.3 without downtime when using proxy/director?
- migration from dovecot to dovecot on different servers without downtime (dovecot replication?)
- Upgrading dovecot 2.2 to 2.3 without downtime when using proxy/director?
- Upgrading dovecot 2.2 to 2.3 without downtime when using proxy/director?