  class ChangeAffiliateDistributionsSaleLineItemIdNotNull < ActiveRecord::Migration
    def self.up
      #change_column_null :affiliate_distributions, :sale_line_item_id, true
      execute "ALTER TABLE affiliate_distributions ALTER COLUMN sale_line_item_id DROP NOT NULL"
    end

    def self.down
      #change_column_null :affiliate_distributions, :sale_line_item_id, false
      execute "ALTER TABLE affiliate_distributions ALTER COLUMN sale_line_item_id SET NOT NULL"
    end
  end
