4c056078fd475326d6b3c80b85dec1d6d33defc3
[depot.git] / db / migrate / 20090202124100_add_product_date_available.rb
1 class AddProductDateAvailable < ActiveRecord::Migration
2 def self.up
3 add_column :products, :date_available, :date
4
5 Product.update(1, :date_available => Time.utc(2008, 12, 25))
6 Product.update(2, :date_available => Time.utc(2010, 12, 25))
7 Product.update(3, :date_available => Time.utc(2009, 1, 1))
8 end
9
10 def self.down
11 remove_column :products, :date_available
12 end
13 end