123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- # 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: 20170405123115) do
- create_table "appointments", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
- t.integer "person_id"
- t.integer "unit_id"
- t.string "name"
- t.string "line"
- t.string "description"
- t.string "room"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["person_id"], name: "index_appointments_on_person_id", using: :btree
- t.index ["unit_id"], name: "index_appointments_on_unit_id", using: :btree
- end
- create_table "people", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
- t.string "login"
- t.string "firstname"
- t.string "lastname"
- t.string "patronymic"
- t.string "displayname"
- t.string "displayname_latin"
- t.string "photo_url"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.boolean "show_email", null: false
- end
- create_table "phone_configs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
- t.string "extension"
- t.string "phone_mac"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.index ["extension"], name: "index_phone_configs_on_extension", unique: true, using: :btree
- t.index ["phone_mac"], name: "index_phone_configs_on_phone_mac", using: :btree
- end
- create_table "units", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
- t.string "code"
- t.string "name"
- t.string "fullname"
- t.string "shortname"
- t.integer "parent_id"
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
- add_foreign_key "appointments", "people"
- add_foreign_key "appointments", "units"
- end
|