tap/db/migrate/20150209144839_not_null_fields.rb

10 lines
216 B
Ruby
Raw Normal View History

2015-02-09 16:06:24 +00:00
class NotNullFields < ActiveRecord::Migration
2015-02-10 07:33:51 +00:00
def up
2015-02-09 16:06:24 +00:00
change_column :order_items, :product_id, :integer, null: false
2015-02-10 07:33:51 +00:00
end
def down
change_column :order_items, :product_id, :integer, null: true
2015-02-09 16:06:24 +00:00
end
end