Sha256: 696147fcef9fd5d8e3d2e739edd9eb048fd9edd4d8b816fa3363432ce090e658

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

class AddSaleFieldsToProducts < ActiveRecord::Migration
  def self.up
    add_column :products, :percent_off, :integer
    add_column :products, :sale_starts_at, :datetime
    add_column :products, :sale_ends_at, :datetime
  end

  def self.down
    remove_column :products, :sale_ends_at
    remove_column :products, :sale_starts_at
    remove_column :products, :percent_off
  end
end

Version data entries

4 entries across 3 versions & 1 rubygems

Version Path
admin_assistant-2.1.0 rails_3_0/db/migrate/20090704173800_add_sale_fields_to_products.rb
admin_assistant-2.0.1 rails_2_test/db/migrate/20090704173800_add_sale_fields_to_products.rb
admin_assistant-2.0.1 rails_3_test/db/migrate/20090704173800_add_sale_fields_to_products.rb
admin_assistant-1.0.1 test_rails_app/db/migrate/20090704173800_add_sale_fields_to_products.rb