Execute a migration command from the Rails console
WARNING Use common sense with this protip! Bypassing migrations to update your database could be a very bad idea in certain situations. You have been warned.
Executing migration commands willy nilly from the console is super freakin' easy!
> ActiveRecord::Migration.add_column :users,
:cute,
:boolean,
default: false
Check out the ActiveRecord::Migration documentation to see all the available commands.
Written by Anthony Smith
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#