noahgibbs / ar_col_drop

Show an oddity in ActiveRecord - how a dropped column interacts with AR automatic schema detection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

This Rails app is a demonstration of a design oddity in ActiveRecord that high-uptime sites will need to carefully work around.

To show the problem, run migrate_test.sh. Or read through it and then do the same thing manually.

You may need to set up database.yml appropriately as well. I have it configured for mysql on localhost, root account and no password. It’s a depressingly common config, but it may not match yours.

Some of its practices aren’t great, and should not be emulated. For instance, it creates seed data using migrations rather than db:seed for ease of reproduction, even though that’s a bad practice.

And I hope this goes without saying, but please don’t put any data you actually care about into this app.

About

Show an oddity in ActiveRecord - how a dropped column interacts with AR automatic schema detection


Languages

Language:Ruby 73.8%Language:HTML 18.2%Language:Shell 3.4%Language:CSS 2.4%Language:JavaScript 2.3%