# 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: 20170816102910) do create_table "approval_comments", force: :cascade do |t| t.integer "request_id", null: false t.integer "user_id", null: false t.text "content", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["request_id"], name: "index_approval_comments_on_request_id" t.index ["user_id"], name: "index_approval_comments_on_user_id" end create_table "approval_items", force: :cascade do |t| t.integer "request_id", null: false t.integer "resource_id" t.string "resource_type", null: false t.string "event", null: false t.text "params" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["request_id"], name: "index_approval_items_on_request_id" t.index ["resource_id", "resource_type"], name: "index_approval_items_on_resource_id_and_resource_type" end create_table "approval_requests", force: :cascade do |t| t.integer "request_user_id", null: false t.integer "respond_user_id" t.integer "state", limit: 1, default: 0, null: false t.datetime "requested_at", null: false t.datetime "cancelled_at" t.datetime "approved_at" t.datetime "rejected_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["request_user_id"], name: "index_approval_requests_on_request_user_id" t.index ["respond_user_id"], name: "index_approval_requests_on_respond_user_id" t.index ["state"], name: "index_approval_requests_on_state" end create_table "books", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "users", force: :cascade do |t| t.string "name" t.datetime "created_at", null: false t.datetime "updated_at", null: false end end