[フレーム]
Last Updated: February 25, 2016
·
4.511K
· anthonator

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.

AltStyle によって変換されたページ (->オリジナル) /