You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

69 line
2.5 KiB

  1. # This file is auto-generated from the current state of the database. Instead
  2. # of editing this file, please use the migrations feature of Active Record to
  3. # incrementally modify your database, and then regenerate this schema definition.
  4. #
  5. # Note that this schema.rb definition is the authoritative source for your
  6. # database schema. If you need to create the application database on another
  7. # system, you should be using db:schema:load, not running all the migrations
  8. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  9. # you'll amass, the slower it'll run and the greater likelihood for issues).
  10. #
  11. # It's strongly recommended that you check this file into your version control system.
  12. ActiveRecord::Schema.define(version: 20161125201757) do
  13. create_table "categories", force: :cascade do |t|
  14. t.string "name"
  15. t.integer "parent_id"
  16. t.datetime "created_at", null: false
  17. t.datetime "updated_at", null: false
  18. t.integer "user_id"
  19. t.index ["parent_id"], name: "index_categories_on_parent_id"
  20. t.index ["user_id"], name: "index_categories_on_user_id"
  21. end
  22. create_table "contents", force: :cascade do |t|
  23. t.text "text"
  24. t.integer "document_id"
  25. t.datetime "created_at", null: false
  26. t.datetime "updated_at", null: false
  27. t.index ["document_id"], name: "index_contents_on_document_id"
  28. end
  29. create_table "documents", force: :cascade do |t|
  30. t.string "name"
  31. t.datetime "created_at", null: false
  32. t.datetime "updated_at", null: false
  33. t.string "doc_file_name"
  34. t.string "doc_content_type"
  35. t.integer "doc_file_size"
  36. t.datetime "doc_updated_at"
  37. t.string "doc_fingerprint"
  38. t.integer "user_id"
  39. t.integer "category_id"
  40. t.index ["category_id"], name: "index_documents_on_category_id"
  41. t.index ["doc_fingerprint"], name: "index_documents_on_doc_fingerprint"
  42. t.index ["user_id"], name: "index_documents_on_user_id"
  43. end
  44. create_table "documents_tags", id: false, force: :cascade do |t|
  45. t.integer "document_id", null: false
  46. t.integer "tag_id", null: false
  47. end
  48. create_table "tags", force: :cascade do |t|
  49. t.string "value"
  50. t.boolean "automatically_asigned"
  51. t.datetime "created_at", null: false
  52. t.datetime "updated_at", null: false
  53. end
  54. create_table "users", force: :cascade do |t|
  55. t.string "name"
  56. t.string "password_digest"
  57. t.datetime "created_at", null: false
  58. t.datetime "updated_at", null: false
  59. end
  60. end