X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=db%2Fmigrate%2F20090202124100_add_product_date_available.rb;fp=db%2Fmigrate%2F20090202124100_add_product_date_available.rb;h=4c056078fd475326d6b3c80b85dec1d6d33defc3;hb=3b424e341e1dda1f67b4461de089b76eb69bbc70;hp=0000000000000000000000000000000000000000;hpb=cf29841dca2a4ba6313a99576d56e238b700a158;p=depot.git diff --git a/db/migrate/20090202124100_add_product_date_available.rb b/db/migrate/20090202124100_add_product_date_available.rb new file mode 100644 index 0000000..4c05607 --- /dev/null +++ b/db/migrate/20090202124100_add_product_date_available.rb @@ -0,0 +1,13 @@ +class AddProductDateAvailable < ActiveRecord::Migration + def self.up + add_column :products, :date_available, :date + + Product.update(1, :date_available => Time.utc(2008, 12, 25)) + Product.update(2, :date_available => Time.utc(2010, 12, 25)) + Product.update(3, :date_available => Time.utc(2009, 1, 1)) + end + + def self.down + remove_column :products, :date_available + end +end