Last Updated: February 25, 2016
·
1.052K
· tomasv

Manipulating the database with ActiveRecord

Ever wanted to quickly change your schema a little bit?

You can do this in the Rails console:

ActiveRecord::Schema.define { drop_table :users }

And drop that pesky users table right there and then.
All the usual methods you might call in your migrations work, as this is the same context.
Be careful. ;)