tap/db/migrate/20150209144839_not_null_fields.rb

10 lines
216 B
Ruby
Raw Normal View History

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