special offers backoffice is ready now
This commit is contained in:
10
front-api/db/migrate/20150315074249_add_flags_to_cart.rb
Normal file
10
front-api/db/migrate/20150315074249_add_flags_to_cart.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class AddFlagsToCart < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :carts, :confirmed, :boolean, default: false
|
||||
add_column :carts, :packed, :boolean, default: false
|
||||
add_column :carts, :canceled_on_check, :boolean, default: false
|
||||
add_column :carts, :canceled_on_delivery, :boolean, default: false
|
||||
add_column :carts, :delivered, :boolean, default: false
|
||||
add_column :carts, :internal_note, :text
|
||||
end
|
||||
end
|
||||
19
front-api/db/migrate/20150318044804_create_special_offers.rb
Normal file
19
front-api/db/migrate/20150318044804_create_special_offers.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
class CreateSpecialOffers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :special_offers do |t|
|
||||
t.string :image_url
|
||||
t.boolean :start_page
|
||||
t.integer :section_id
|
||||
t.integer :category_id
|
||||
t.integer :sub_category_id
|
||||
t.integer :item_id
|
||||
t.boolean :thank_you_page
|
||||
t.boolean :search_result_page
|
||||
t.boolean :checkout_page
|
||||
t.date :beginning
|
||||
t.date :ending
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddSpecialOfferToItem < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :items, :special_offer_id, :integer
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150314033743) do
|
||||
ActiveRecord::Schema.define(version: 20150318044933) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -23,6 +23,12 @@ ActiveRecord::Schema.define(version: 20150314033743) do
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "anonymous_id_string"
|
||||
t.integer "delivery_destination_id"
|
||||
t.boolean "confirmed"
|
||||
t.boolean "packed"
|
||||
t.boolean "canceled_on_check"
|
||||
t.boolean "canceled_on_delivery"
|
||||
t.boolean "delivered"
|
||||
t.text "internal_note"
|
||||
end
|
||||
|
||||
create_table "categories", force: :cascade do |t|
|
||||
@@ -89,6 +95,7 @@ ActiveRecord::Schema.define(version: 20150314033743) do
|
||||
t.json "traits"
|
||||
t.integer "supplier_id"
|
||||
t.decimal "weight", precision: 5, scale: 3
|
||||
t.integer "special_offer_id"
|
||||
end
|
||||
|
||||
create_table "media_types", force: :cascade do |t|
|
||||
@@ -115,6 +122,22 @@ ActiveRecord::Schema.define(version: 20150314033743) do
|
||||
t.string "name"
|
||||
end
|
||||
|
||||
create_table "special_offers", force: :cascade do |t|
|
||||
t.string "image_url"
|
||||
t.boolean "start_page"
|
||||
t.integer "section_id"
|
||||
t.integer "category_id"
|
||||
t.integer "sub_category_id"
|
||||
t.integer "item_id"
|
||||
t.boolean "thank_you_page"
|
||||
t.boolean "search_result_page"
|
||||
t.boolean "checkout_page"
|
||||
t.date "beginning"
|
||||
t.date "ending"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "sub_categories", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.integer "category_id"
|
||||
|
||||
Reference in New Issue
Block a user