|
1 | | -# encoding: UTF-8 |
2 | 1 | # This file is auto-generated from the current state of the database. Instead |
3 | 2 | # of editing this file, please use the migrations feature of Active Record to |
4 | 3 | # incrementally modify your database, and then regenerate this schema definition. |
|
11 | 10 | # |
12 | 11 | # It's strongly recommended that you check this file into your version control system. |
13 | 12 |
|
14 | | -ActiveRecord::Schema.define(version: 20190528071907) do |
| 13 | +ActiveRecord::Schema.define(version: 2019_05_28_071907) do |
15 | 14 |
|
16 | | - create_table "documents", force: :cascade do |t| |
17 | | - t.string "title", limit: 255 |
18 | | - t.text "description", limit: 65535 |
19 | | - t.date "document_date" |
20 | | - t.string "document_url", limit: 255 |
21 | | - t.decimal "version", precision: 10 |
22 | | - t.integer "folder_id", limit: 4 |
23 | | - t.integer "user_id", limit: 4 |
24 | | - t.integer "state_id", limit: 4 |
25 | | - t.integer "person_id", limit: 4 |
26 | | - t.datetime "created_at", null: false |
27 | | - t.datetime "updated_at", null: false |
| 15 | + create_table "documents", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 16 | + t.string "title" |
| 17 | + t.text "description" |
| 18 | + t.date "document_date" |
| 19 | + t.string "document_url" |
| 20 | + t.decimal "version", precision: 10 |
| 21 | + t.integer "folder_id" |
| 22 | + t.integer "user_id" |
| 23 | + t.integer "state_id" |
| 24 | + t.integer "person_id" |
| 25 | + t.datetime "created_at", null: false |
| 26 | + t.datetime "updated_at", null: false |
| 27 | + t.index ["folder_id"], name: "index_documents_on_folder_id" |
| 28 | + t.index ["person_id"], name: "index_documents_on_person_id" |
| 29 | + t.index ["state_id"], name: "index_documents_on_state_id" |
| 30 | + t.index ["user_id"], name: "index_documents_on_user_id" |
28 | 31 | end |
29 | 32 |
|
30 | | - add_index "documents", ["folder_id"], name: "index_documents_on_folder_id", using: :btree |
31 | | - add_index "documents", ["person_id"], name: "index_documents_on_person_id", using: :btree |
32 | | - add_index "documents", ["state_id"], name: "index_documents_on_state_id", using: :btree |
33 | | - add_index "documents", ["user_id"], name: "index_documents_on_user_id", using: :btree |
34 | | - |
35 | | - create_table "documenttags", force: :cascade do |t| |
36 | | - t.integer "document_id", limit: 4 |
37 | | - t.integer "tag_id", limit: 4 |
38 | | - t.datetime "created_at", null: false |
39 | | - t.datetime "updated_at", null: false |
| 33 | + create_table "documenttags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 34 | + t.integer "document_id" |
| 35 | + t.integer "tag_id" |
| 36 | + t.datetime "created_at", null: false |
| 37 | + t.datetime "updated_at", null: false |
| 38 | + t.index ["document_id"], name: "index_documenttags_on_document_id" |
| 39 | + t.index ["tag_id"], name: "index_documenttags_on_tag_id" |
40 | 40 | end |
41 | 41 |
|
42 | | - add_index "documenttags", ["document_id"], name: "index_documenttags_on_document_id", using: :btree |
43 | | - add_index "documenttags", ["tag_id"], name: "index_documenttags_on_tag_id", using: :btree |
44 | | - |
45 | | - create_table "folders", force: :cascade do |t| |
46 | | - t.string "name", limit: 255 |
47 | | - t.integer "folder_id", limit: 4 |
48 | | - t.integer "user_id", limit: 4 |
49 | | - t.datetime "created_at", null: false |
50 | | - t.datetime "updated_at", null: false |
| 42 | + create_table "folders", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 43 | + t.string "name" |
| 44 | + t.integer "folder_id" |
| 45 | + t.integer "user_id" |
| 46 | + t.datetime "created_at", null: false |
| 47 | + t.datetime "updated_at", null: false |
| 48 | + t.index ["folder_id"], name: "index_folders_on_folder_id" |
| 49 | + t.index ["name"], name: "index_folders_on_name", unique: true |
| 50 | + t.index ["user_id"], name: "index_folders_on_user_id" |
51 | 51 | end |
52 | 52 |
|
53 | | - add_index "folders", ["folder_id"], name: "index_folders_on_folder_id", using: :btree |
54 | | - add_index "folders", ["name"], name: "index_folders_on_name", unique: true, using: :btree |
55 | | - add_index "folders", ["user_id"], name: "index_folders_on_user_id", using: :btree |
56 | | - |
57 | | - create_table "people", force: :cascade do |t| |
58 | | - t.string "name", limit: 255 |
59 | | - t.integer "user_id", limit: 4 |
60 | | - t.datetime "created_at", null: false |
61 | | - t.datetime "updated_at", null: false |
| 53 | + create_table "people", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 54 | + t.string "name" |
| 55 | + t.integer "user_id" |
| 56 | + t.datetime "created_at", null: false |
| 57 | + t.datetime "updated_at", null: false |
62 | 58 | end |
63 | 59 |
|
64 | | - create_table "states", force: :cascade do |t| |
65 | | - t.string "name", limit: 255 |
66 | | - t.integer "user_id", limit: 4 |
67 | | - t.datetime "created_at", null: false |
68 | | - t.datetime "updated_at", null: false |
| 60 | + create_table "states", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 61 | + t.string "name" |
| 62 | + t.integer "user_id" |
| 63 | + t.datetime "created_at", null: false |
| 64 | + t.datetime "updated_at", null: false |
| 65 | + t.index ["name"], name: "index_states_on_name", unique: true |
69 | 66 | end |
70 | 67 |
|
71 | | - add_index "states", ["name"], name: "index_states_on_name", unique: true, using: :btree |
72 | | - |
73 | | - create_table "tags", force: :cascade do |t| |
74 | | - t.string "name", limit: 255 |
75 | | - t.integer "user_id", limit: 4 |
76 | | - t.string "color", limit: 255 |
77 | | - t.datetime "created_at", null: false |
78 | | - t.datetime "updated_at", null: false |
| 68 | + create_table "tags", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 69 | + t.string "name" |
| 70 | + t.integer "user_id" |
| 71 | + t.string "color" |
| 72 | + t.datetime "created_at", null: false |
| 73 | + t.datetime "updated_at", null: false |
79 | 74 | end |
80 | 75 |
|
81 | | - create_table "users", force: :cascade do |t| |
82 | | - t.string "name", limit: 255 |
83 | | - t.string "password_digest", limit: 255 |
84 | | - t.string "email", limit: 255 |
85 | | - t.datetime "created_at", null: false |
86 | | - t.datetime "updated_at", null: false |
| 76 | + create_table "users", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=latin1", force: :cascade do |t| |
| 77 | + t.string "name" |
| 78 | + t.string "password_digest" |
| 79 | + t.string "email" |
| 80 | + t.datetime "created_at", null: false |
| 81 | + t.datetime "updated_at", null: false |
| 82 | + t.index ["email"], name: "index_users_on_email", unique: true |
87 | 83 | end |
88 | 84 |
|
89 | | - add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree |
90 | | - |
91 | 85 | add_foreign_key "documents", "folders" |
92 | 86 | add_foreign_key "documents", "people" |
93 | 87 | add_foreign_key "documents", "states" |
|
0 commit comments