Redid up to end of Chapter 6 under Rails2.2.2 and Gems 1.3.1, with Product.date_available
[depot.git] / db / migrate / 20090202160210_create_products.rb
diff --git a/db/migrate/20090202160210_create_products.rb b/db/migrate/20090202160210_create_products.rb
new file mode 100644 (file)
index 0000000..6b51c3f
--- /dev/null
@@ -0,0 +1,15 @@
+class CreateProducts < ActiveRecord::Migration
+  def self.up
+    create_table :products do |t|
+      t.string :title
+      t.text :description
+      t.string :image_url
+
+      t.timestamps
+    end
+  end
+
+  def self.down
+    drop_table :products
+  end
+end