  class PayPalFieldForAffiliate < ActiveRecord::Migration
    def self.up
      execute "ALTER TABLE affiliate_partners ADD COLUMN paypal_id VARCHAR(255)"
      execute %(
        CREATE TABLE affiliate_links (
             id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
             name VARCHAR(255) NOT NULL,
             link VARCHAR(1024) NOT NULL,
             created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
             updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
        )
      )
    end
    def self.down
      execute "DROP TABLE affiliate_links"
      execute "ALTER TABLE affiliate_partners DROP COLUMN paypal_id"
    end
  end
