lib/generators/ecommerce/templates/migration.rb in ecommerce-0.0.2 vs lib/generators/ecommerce/templates/migration.rb in ecommerce-0.0.3
- old
+ new
@@ -9,11 +9,11 @@
t.column :price, :decimal, :precision => 8, :scale => 2, :default => 0
t.column :sale_price, :decimal, :precision => 8, :scale => 2, :default => 0
t.text :meta_description
t.text :meta_keywords
t.string :tags
- t.int :shipping_weight
+ t.integer :shipping_weight
t.timestamps
end
# Each product has_many :photos
create_table :photos do |t|
@@ -35,11 +35,11 @@
t.integer :product_id
t.integer :quantity
end
# PayPal -- how they let us know when a payment has cleared
- create_table :payment_notifications do |t|
+ create_table :payment_handlers do |t|
t.text :params
t.integer :cart_id
t.string :status
t.string :transaction_id
t.timestamps
@@ -50,10 +50,10 @@
def self.down
drop_table :products
drop_table :photos
drop_table :carts
drop_table :cart_items
- drop_table :payment_notifications
+ drop_table :payment_handlers
end
end