5 ms·
Rails used to cache the list of columns after the first query and then expect all of those columns on subsequent queries. It made it so that if you removed an u
by singron 4y ago
Rails used to cache the list of columns after the first query and then expect all of those columns on subsequent queries. It made it so that if you removed an unused column, all your queries would fail until you restarted your rails processes.
- nijave 4y agoSemi related https://github.com/ankane/strong_migrations https://github.com/ankane/strong_migrations
- byroot 4y agoThat's what `ignored_columns` is for: https://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-ignored_columns https://api.rubyonrails.org/classes/ActiveRecord/ModelSchema...