| 1 |
# encoding: UTF-8 |
| 2 |
# This file is auto-generated from the current state of the database. Instead |
| 3 |
# of editing this file, please use the migrations feature of Active Record to |
| 4 |
# incrementally modify your database, and then regenerate this schema definition. |
| 5 |
# |
| 6 |
# Note that this schema.rb definition is the authoritative source for your |
| 7 |
# database schema. If you need to create the application database on another |
| 8 |
# system, you should be using db:schema:load, not running all the migrations |
| 9 |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations |
| 10 |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
| 11 |
# |
| 12 |
# It's strongly recommended that you check this file into your version control system. |
| 13 |
|
| 14 |
ActiveRecord::Schema.define(version: 20140421231157) do |
| 15 |
|
| 16 |
create_table "bookmarkings", force: true do |t| |
| 17 |
t.integer "user_id", null: false |
| 18 |
t.text "path", null: false |
| 19 |
t.string "location", null: false |
| 20 |
t.datetime "created_at" |
| 21 |
t.datetime "updated_at" |
| 22 |
end |
| 23 |
|
| 24 |
add_index "bookmarkings", ["user_id", "path"], name: "index_bookmarkings_on_user_id_and_path", unique: true |
| 25 |
add_index "bookmarkings", ["user_id", "updated_at"], name: "index_bookmarkings_on_user_id_and_updated_at" |
| 26 |
|
| 27 |
create_table "caches", force: true do |t| |
| 28 |
t.integer "user_id", null: false |
| 29 |
t.integer "itemtype", null: false |
| 30 |
t.text "path", null: false |
| 31 |
t.string "location", null: false |
| 32 |
t.binary "data" |
| 33 |
t.datetime "access_at", null: false |
| 34 |
t.datetime "created_at" |
| 35 |
t.datetime "updated_at" |
| 36 |
end |
| 37 |
|
| 38 |
add_index "caches", ["user_id", "itemtype", "path", "location"], name: "index_caches_on_user_id_and_itemtype_and_path_and_location", unique: true |
| 39 |
|
| 40 |
create_table "filelist_locations", force: true do |t| |
| 41 |
t.integer "user_id", null: false |
| 42 |
t.text "path", null: false |
| 43 |
t.integer "scrolltop", default: 0, null: false |
| 44 |
t.text "last_access_child" |
| 45 |
t.datetime "touch_at" |
| 46 |
t.datetime "created_at" |
| 47 |
t.datetime "updated_at" |
| 48 |
end |
| 49 |
|
| 50 |
add_index "filelist_locations", ["user_id", "path"], name: "index_filelist_locations_on_user_id_and_path", unique: true |
| 51 |
add_index "filelist_locations", ["user_id", "touch_at"], name: "index_filelist_locations_on_user_id_and_touch_at" |
| 52 |
|
| 53 |
create_table "logs", force: true do |t| |
| 54 |
t.integer "user_id", null: false |
| 55 |
t.string "event", null: false |
| 56 |
t.datetime "created_at" |
| 57 |
t.datetime "updated_at" |
| 58 |
end |
| 59 |
|
| 60 |
add_index "logs", ["user_id", "updated_at"], name: "index_logs_on_user_id_and_updated_at" |
| 61 |
|
| 62 |
create_table "readings", force: true do |t| |
| 63 |
t.integer "user_id", null: false |
| 64 |
t.text "path", null: false |
| 65 |
t.string "location", null: false |
| 66 |
t.datetime "start_at" |
| 67 |
t.datetime "end_at" |
| 68 |
t.datetime "touch_at" |
| 69 |
t.datetime "created_at" |
| 70 |
t.datetime "updated_at" |
| 71 |
end |
| 72 |
|
| 73 |
add_index "readings", ["user_id", "path"], name: "index_readings_on_user_id_and_path", unique: true |
| 74 |
add_index "readings", ["user_id", "touch_at"], name: "index_readings_on_user_id_and_touch_at" |
| 75 |
|
| 76 |
create_table "roots", force: true do |t| |
| 77 |
t.integer "user_id", null: false |
| 78 |
t.string "virt_path", null: false |
| 79 |
t.text "real_path", null: false |
| 80 |
t.datetime "created_at" |
| 81 |
t.datetime "updated_at" |
| 82 |
end |
| 83 |
|
| 84 |
add_index "roots", ["user_id", "virt_path"], name: "index_roots_on_user_id_and_virt_path", unique: true |
| 85 |
|
| 86 |
create_table "settings", force: true do |t| |
| 87 |
t.integer "user_id", null: false |
| 88 |
t.string "key", null: false |
| 89 |
t.string "value", null: false |
| 90 |
t.datetime "created_at" |
| 91 |
t.datetime "updated_at" |
| 92 |
t.text "path", null: false |
| 93 |
end |
| 94 |
|
| 95 |
add_index "settings", ["user_id", "path", "key"], name: "index_settings_on_user_id_and_path_and_key", unique: true |
| 96 |
|
| 97 |
create_table "taggings", force: true do |t| |
| 98 |
t.integer "tag_id", null: false |
| 99 |
t.integer "order", null: false |
| 100 |
t.text "path", null: false |
| 101 |
t.string "location", null: false |
| 102 |
t.datetime "created_at" |
| 103 |
t.datetime "updated_at" |
| 104 |
end |
| 105 |
|
| 106 |
add_index "taggings", ["tag_id", "order"], name: "index_taggings_on_tag_id_and_order", unique: true |
| 107 |
|
| 108 |
create_table "tags", force: true do |t| |
| 109 |
t.integer "user_id", null: false |
| 110 |
t.integer "tag_id" |
| 111 |
t.integer "order", null: false |
| 112 |
t.string "name", null: false |
| 113 |
t.datetime "created_at" |
| 114 |
t.datetime "updated_at" |
| 115 |
end |
| 116 |
|
| 117 |
add_index "tags", ["user_id", "name"], name: "index_tags_on_user_id_and_name" |
| 118 |
add_index "tags", ["user_id", "tag_id", "name"], name: "index_tags_on_user_id_and_tag_id_and_name", unique: true |
| 119 |
add_index "tags", ["user_id", "tag_id", "order"], name: "index_tags_on_user_id_and_tag_id_and_order" |
| 120 |
|
| 121 |
create_table "users", force: true do |t| |
| 122 |
t.string "name", null: false |
| 123 |
t.string "password" |
| 124 |
t.text "last_path", default: "", null: false |
| 125 |
t.string "last_location", default: "", null: false |
| 126 |
t.text "filelist_last_path", default: "", null: false |
| 127 |
t.string "filelist_last_location", default: "", null: false |
| 128 |
t.datetime "created_at" |
| 129 |
t.datetime "updated_at" |
| 130 |
t.string "pin" |
| 131 |
end |
| 132 |
|
| 133 |
add_index "users", ["name"], name: "index_users_on_name", unique: true |
| 134 |
|
| 135 |
end |