Skip to content

Instantly share code, notes, and snippets.

@guivinicius
Created June 12, 2015 18:19
Show Gist options
  • Save guivinicius/3f1f6dbaf7b17e3b767f to your computer and use it in GitHub Desktop.
Save guivinicius/3f1f6dbaf7b17e3b767f to your computer and use it in GitHub Desktop.
categories schema
# 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: 20150612180932) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "categories", force: :cascade do |t|
t.string "name"
t.string "slug"
t.integer "position"
t.integer "parent_id"
t.integer "lft", null: false
t.integer "rgt", null: false
t.integer "depth", default: 0, null: false
t.integer "children_count", default: 0, null: false
t.boolean "enabled", default: true, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "locale", default: "en", null: false
t.string "westfield_locale", null: false
end
add_index "categories", ["depth"], name: "index_categories_on_depth", using: :btree
add_index "categories", ["lft"], name: "index_categories_on_lft", using: :btree
add_index "categories", ["locale", "westfield_locale"], name: "index_categories_on_locale_and_westfield_locale", using: :btree
add_index "categories", ["locale"], name: "index_categories_on_locale", using: :btree
add_index "categories", ["parent_id"], name: "index_categories_on_parent_id", using: :btree
add_index "categories", ["rgt"], name: "index_categories_on_rgt", using: :btree
add_index "categories", ["westfield_locale"], name: "index_categories_on_westfield_locale", using: :btree
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment