# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20150207120207) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "carts", force: :cascade do |t| t.integer "user_id" t.boolean "ordered", default: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "anonymous_id_string" end create_table "categories", force: :cascade do |t| t.string "name" t.integer "section_id" t.string "image_url" end create_table "filter_criteria", force: :cascade do |t| t.string "title" t.string "field_name" t.integer "type" t.integer "owner_type" t.integer "owner_id" end create_table "filter_criteria_values", force: :cascade do |t| t.string "filter_text" t.string "filter_value" t.integer "filter_criteria_id" end create_table "item_in_carts", force: :cascade do |t| t.integer "cart_id" t.integer "item_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "count" end create_table "items", force: :cascade do |t| t.string "name" t.string "code", limit: 10 t.decimal "current_input_price", precision: 5, scale: 2 t.decimal "list_price", precision: 5, scale: 2 t.integer "unit_id" t.decimal "units_in_pack", precision: 5, scale: 3 t.text "description" t.integer "sub_category_id" t.integer "stock" t.boolean "on_display" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "tags" t.json "traits" end create_table "media_types", force: :cascade do |t| t.string "name" end create_table "multi_media_descriptions", force: :cascade do |t| t.string "url" t.integer "item_id" t.integer "media_type_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "sections", force: :cascade do |t| t.string "name" end create_table "sub_categories", force: :cascade do |t| t.string "name" t.integer "category_id" end create_table "units", force: :cascade do |t| t.string "name" t.string "short_name", limit: 4 t.string "description_suffix" t.string "number_of_pieces_suffix" end end