Finished chapter 6
[depot.git] / db / migrate / 20090128142730_add_product_price.rb
diff --git a/db/migrate/20090128142730_add_product_price.rb b/db/migrate/20090128142730_add_product_price.rb
new file mode 100644 (file)
index 0000000..f49426b
--- /dev/null
@@ -0,0 +1,9 @@
+class AddProductPrice < ActiveRecord::Migration
+  def self.up
+    add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0
+  end
+
+  def self.down
+    remove_column :products, :price
+  end
+end