tap/db/migrate/20150209144839_not_null_fields.rb
2015-02-10 08:33:51 +01:00

9 lines
216 B
Ruby

class NotNullFields < ActiveRecord::Migration
def up
change_column :order_items, :product_id, :integer, null: false
end
def down
change_column :order_items, :product_id, :integer, null: true
end
end