class AddPromotionIdToPreSale < ActiveRecord::Migration def change add_column :pre_sales, :promotion_id, :integer, index: true, null: true unless column_exists? :pre_sales, :promotion_id end end