Sha256: 6e1de6538b7bfbb3eb07083aa604bef3e88ffff34a5f9564a4e496ceaf7416fc

Contents?: true

Size: 879 Bytes

Versions: 2

Compression:

Stored size: 879 Bytes

Contents

class AddPatronageToPeople < ActiveRecord::Migration
  def self.up
    add_column :people, :godfather_id, :integer
    add_column :people, :patronage_count, :integer, :default => 0, :nil => false
    add_column :settings, :godfather_discount_price, :float, :default => 0.0
    add_column :settings, :nephew_discount_price, :float, :default => 0.0
    add_column :settings, :godfather_discount_percent, :boolean, :default => false, :null => false
    add_column :settings, :nephew_discount_percent, :boolean, :default => false, :null => false

  end

  def self.down
    remove_column :people, :godfather_id
    remove_column :people, :patronage_count
    remove_column :settings, :nephew_discount_percent
    remove_column :settings, :godfather_discount_percent
    remove_column :settings, :nephew_discount_price
    remove_column :settings, :godfather_discount_price
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forgeos_commerce-1.9.1.rc1 db/migrate/20100928123009_add_patronage_to_people.rb
forgeos_commerce-1.9.0 db/migrate/20100928123009_add_patronage_to_people.rb