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. ;)
Written by Tomas Varneckas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#