diff --git a/db/schema.rb b/db/schema.rb index 5e82211..ee1ecfc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -45,14 +45,33 @@ ActiveRecord::Schema.define(version: 20180119145343) do t.text "small_text" t.text "full_text", limit: 16777215 t.timestamp "updated_at" - t.integer "updated_by" + t.bigint "updated_by" t.boolean "published", default: false, null: false end create_table "articles", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci" do |t| t.string "name", null: false t.timestamp "updated_at" - t.integer "updated_by" + t.bigint "updated_by" + end + + create_table "cart_products", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.bigint "cart_id", null: false + t.integer "product_id", null: false + t.integer "quantity", null: false + t.decimal "price", precision: 10, scale: 2, null: false + t.datetime "created_at" + t.datetime "updated_at" + t.index ["cart_id", "product_id"], name: "cart_id" + end + + create_table "carts", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.string "uuid", limit: 80, null: false + t.string "ip" + t.string "useragent" + t.datetime "created_at" + t.datetime "updated_at" + t.index ["uuid"], name: "uuid" end create_table "categories", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| @@ -62,9 +81,9 @@ ActiveRecord::Schema.define(version: 20180119145343) do t.string "slug", null: false t.boolean "active", default: true, null: false t.datetime "created_at" - t.integer "created_by" + t.bigint "created_by" t.datetime "updated_at" - t.integer "updated_by" + t.bigint "updated_by" t.index ["active"], name: "active" t.index ["name"], name: "name" t.index ["parent_id"], name: "parent_id" @@ -92,7 +111,7 @@ ActiveRecord::Schema.define(version: 20180119145343) do create_table "images", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.string "imageable_type", null: false - t.integer "imageable_id", null: false + t.bigint "imageable_id", null: false t.string "image_file_name", null: false t.string "image_content_type", null: false t.integer "image_file_size", null: false @@ -107,6 +126,66 @@ ActiveRecord::Schema.define(version: 20180119145343) do t.index ["position"], name: "position" end + create_table "order_faqs", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.string "title", limit: 40, null: false + t.text "description", null: false + t.integer "position", default: 0, null: false + t.integer "active", default: 0, null: false + t.datetime "created_at" + t.bigint "created_by" + t.datetime "updated_at" + t.bigint "updated_by" + t.index ["position"], name: "position" + end + + create_table "order_histories", id: :bigint, unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.bigint "order_id", null: false + t.integer "status", null: false + t.datetime "created_at" + t.integer "created_by" + t.index ["order_id"], name: "order_id" + end + + create_table "order_products", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.integer "order_id", null: false + t.integer "product_id", null: false + t.integer "quantity", null: false + t.decimal "price", precision: 10, scale: 2, null: false + t.datetime "created_at" + t.datetime "updated_at" + t.index ["order_id", "product_id"], name: "order_id" + end + + create_table "orders", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.bigint "cart_id", null: false + t.integer "shipping_id" + t.integer "payment_method_id" + t.boolean "terms_of_service_acceptance" + t.string "email" + t.string "first_name", limit: 80 + t.string "last_name", limit: 80 + t.string "phone", limit: 15 + t.string "street" + t.string "city", limit: 80 + t.string "zip_code", limit: 10 + t.text "message_from_client" + t.integer "status", default: 0, null: false + t.datetime "created_at" + t.datetime "updated_at" + t.bigint "updated_by" + end + + create_table "payment_methods", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.string "name", limit: 40, null: false + t.string "description", null: false + t.boolean "default", default: false, null: false + t.boolean "active", default: false, null: false + t.datetime "created_at" + t.integer "created_by" + t.datetime "updated_at" + t.integer "updated_by" + end + create_table "products", id: :integer, unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.string "name", null: false t.string "slug", null: false @@ -118,9 +197,9 @@ ActiveRecord::Schema.define(version: 20180119145343) do t.boolean "chk_quantity", default: false, null: false t.boolean "active", default: false, null: false t.datetime "created_at" - t.integer "created_by", unsigned: true + t.bigint "created_by", unsigned: true t.datetime "updated_at" - t.integer "updated_by", unsigned: true + t.bigint "updated_by", unsigned: true t.index ["active"], name: "active" t.index ["name"], name: "name" t.index ["slug"], name: "slug" @@ -140,9 +219,9 @@ ActiveRecord::Schema.define(version: 20180119145343) do t.text "small_text" t.text "full_text", limit: 16777215 t.timestamp "created_at" - t.integer "created_by" + t.bigint "created_by" t.timestamp "updated_at" - t.integer "updated_by" + t.bigint "updated_by" t.index ["all_page_id"], name: "all_page_id" t.index ["created_at"], name: "created_at" t.index ["number_of_views"], name: "number_of_views" @@ -153,12 +232,29 @@ ActiveRecord::Schema.define(version: 20180119145343) do create_table "sc_settings", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci" do |t| t.integer "index_number_of_views", default: 0, null: false t.integer "contact_number_of_views", default: 0, null: false + t.string "shop_name" t.boolean "chk_quantity_global", default: false, null: false + t.boolean "shop_active", default: true, null: false t.text "index_page_first_info", limit: 4294967295 t.text "index_page_second_info", limit: 4294967295 t.text "index_page_content", limit: 4294967295 + t.text "shop_owners_emails" t.datetime "updated_at" t.integer "updated_by" end + create_table "shippings", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| + t.string "name", null: false + t.decimal "price", precision: 10, scale: 2, null: false + t.boolean "default", default: false, null: false + t.boolean "active", default: true, null: false + t.datetime "created_at" + t.bigint "created_by" + t.datetime "updated_at" + t.bigint "updated_by" + t.index ["active"], name: "active" + t.index ["default"], name: "default" + t.index ["name"], name: "name" + end + end