Class: CreateAffiliateEvents

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/templates/db/migrate/20101104145139_create_affiliate_events.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/templates/db/migrate/20101104145139_create_affiliate_events.rb', line 13

def self.down
  drop_table :affiliate_events
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/templates/db/migrate/20101104145139_create_affiliate_events.rb', line 2

def self.up
  create_table :affiliate_events do |t|
    t.string :name
    t.integer :reward_id
    t.string :reward_type
    t.references :affiliate
    t.references :user
    t.timestamps
  end
end