# 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: 20170808150920) do create_table "calendars", force: :cascade do |t| t.string "name" t.string "slug" t.text "description" t.string "css_class" t.index ["slug"], name: "index_calendars_on_slug", unique: true end create_table "event_occurrences", force: :cascade do |t| t.string "schedulable_type" t.integer "schedulable_id" t.datetime "date" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.datetime "end_date" t.index ["schedulable_type", "schedulable_id"], name: "index_event_occurrences_on_schedulable_type_and_schedulable_id" end create_table "events", force: :cascade do |t| t.integer "calendar_id" t.string "name" t.string "slug" t.text "description" t.string "css_class" t.string "text_color", default: "#ffffff" t.string "background_color", default: "#3a87ad" t.string "border_color", default: "#235371" t.date "start_date" t.time "start_time" t.integer "duration" t.boolean "all_day" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["calendar_id"], name: "index_events_on_calendar_id" end create_table "roles", force: :cascade do |t| t.string "name" t.string "resource_type" t.integer "resource_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id" t.index ["name"], name: "index_roles_on_name" t.index ["resource_type", "resource_id"], name: "index_roles_on_resource_type_and_resource_id" end create_table "schedules", force: :cascade do |t| t.string "schedulable_type" t.integer "schedulable_id" t.date "date" t.time "time" t.string "rule" t.string "interval" t.text "day" t.text "day_of_week" t.datetime "until" t.integer "count" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "duration", default: 3600 t.boolean "all_day", default: false t.index ["schedulable_type", "schedulable_id"], name: "index_schedules_on_schedulable_type_and_schedulable_id" end create_table "users", force: :cascade do |t| t.string "name" t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.index ["email"], name: "index_users_on_email", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end create_table "users_roles", id: false, force: :cascade do |t| t.integer "user_id" t.integer "role_id" t.index ["role_id"], name: "index_users_roles_on_role_id" t.index ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id" t.index ["user_id"], name: "index_users_roles_on_user_id" end end