scinote-web/db/migrate/20170207100731_add_state_to_tasks.rb

19 lines
410 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class AddStateToTasks < ActiveRecord::Migration[4.2]
def up
add_column :my_modules,
:state,
:integer,
limit: 1,
default: 0
add_column :my_modules,
:completed_on,
:datetime,
null: true
end
def down
remove_column :my_modules, :state
remove_column :my_modules, :completed_on
end
end