Remove purchase_price from products and rename sale_price
This commit is contained in:
parent
b9e42b8bc1
commit
ebf2275c94
|
@ -0,0 +1,6 @@
|
||||||
|
class RemovePurchasePriceFromProducts < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
remove_column :products, :purchase_price, :integer
|
||||||
|
rename_column :products, :sale_price, :price
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20141204191328) do
|
ActiveRecord::Schema.define(version: 20141208160113) do
|
||||||
|
|
||||||
create_table "order_products", force: true do |t|
|
create_table "order_products", force: true do |t|
|
||||||
t.integer "order_id"
|
t.integer "order_id"
|
||||||
|
@ -31,8 +31,7 @@ ActiveRecord::Schema.define(version: 20141204191328) do
|
||||||
|
|
||||||
create_table "products", force: true do |t|
|
create_table "products", force: true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "purchase_price"
|
t.integer "price"
|
||||||
t.integer "sale_price"
|
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "avatar_file_name"
|
t.string "avatar_file_name"
|
||||||
|
|
Loading…
Reference in a new issue