projects
/
depot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
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
+++ b/
db/migrate/20090128142730_add_product_price.rb
@@ -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