--- /dev/null
+class RebuildMerchandisesTable < ActiveRecord::Migration
+
+ # This whole thing is an awful way of doing a column rename
+
+ def self.up
+ drop_table :merchandises
+
+ create_table :merchandises do |t|
+ t.column :title, :string, :null => false
+ t.column :quantity, :integer, :null => false, :default => 0
+ t.column :price, :decimal, :precision => 8, :scale =>2, :default => 0
+ end
+ end
+
+ def self.down
+ drop_table :merchandises
+
+ create_table :merchandises do |t|
+ t.column :name, :string, :null => false
+ t.column :quantity, :integer, :null => false, :default => 0
+ t.column :price, :decimal, :precision => 8, :scale =>2, :default => 0
+ end
+ end
+end