schema.rb 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. # This file is the source Rails uses to define your schema when running `bin/rails
  6. # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
  7. # be faster and is potentially less error prone than running all of your
  8. # migrations from scratch. Old migrations may fail to apply correctly if those
  9. # migrations use external dependencies or application code.
  10. #
  11. # It's strongly recommended that you check this file into your version control system.
  12. ActiveRecord::Schema.define(version: 2022_01_05_101931) do
  13. create_table "active_storage_attachments", charset: "utf8mb4", force: :cascade do |t|
  14. t.string "name", null: false
  15. t.string "record_type", null: false
  16. t.bigint "record_id", null: false
  17. t.bigint "blob_id", null: false
  18. t.datetime "created_at", null: false
  19. t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
  20. t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
  21. end
  22. create_table "active_storage_blobs", charset: "utf8mb4", force: :cascade do |t|
  23. t.string "key", null: false
  24. t.string "filename", null: false
  25. t.string "content_type"
  26. t.text "metadata"
  27. t.string "service_name", null: false
  28. t.bigint "byte_size", null: false
  29. t.string "checksum", null: false
  30. t.datetime "created_at", null: false
  31. t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
  32. end
  33. create_table "active_storage_variant_records", charset: "utf8mb4", force: :cascade do |t|
  34. t.bigint "blob_id", null: false
  35. t.string "variation_digest", null: false
  36. t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
  37. end
  38. create_table "licenses", charset: "utf8mb4", force: :cascade do |t|
  39. t.string "name"
  40. t.string "url"
  41. t.datetime "created_at", precision: 6, null: false
  42. t.datetime "updated_at", precision: 6, null: false
  43. end
  44. create_table "mail_adresses", charset: "utf8mb4", force: :cascade do |t|
  45. t.bigint "user_id", null: false
  46. t.string "address"
  47. t.integer "priority"
  48. t.integer "visibility"
  49. t.datetime "created_at", precision: 6, null: false
  50. t.datetime "updated_at", precision: 6, null: false
  51. t.index ["user_id"], name: "index_mail_adresses_on_user_id"
  52. end
  53. create_table "messages", charset: "utf8mb4", force: :cascade do |t|
  54. t.bigint "user_id", null: false
  55. t.string "sender_name"
  56. t.string "sender_email"
  57. t.text "text"
  58. t.datetime "dtime"
  59. t.string "language"
  60. t.string "ip"
  61. t.datetime "created_at", precision: 6, null: false
  62. t.datetime "updated_at", precision: 6, null: false
  63. t.index ["user_id"], name: "index_messages_on_user_id"
  64. end
  65. create_table "project_urls", charset: "utf8mb4", force: :cascade do |t|
  66. t.bigint "project_id", null: false
  67. t.string "url"
  68. t.bigint "urlTarget_id", null: false
  69. t.boolean "deprecated"
  70. t.datetime "created_at", precision: 6, null: false
  71. t.datetime "updated_at", precision: 6, null: false
  72. t.index ["project_id"], name: "index_project_urls_on_project_id"
  73. t.index ["urlTarget_id"], name: "index_project_urls_on_urlTarget_id"
  74. end
  75. create_table "projects", charset: "utf8mb4", force: :cascade do |t|
  76. t.string "permalink"
  77. t.integer "priority"
  78. t.integer "nature"
  79. t.string "title"
  80. t.string "logo"
  81. t.string "header"
  82. t.text "text"
  83. t.text "comment"
  84. t.bigint "license_id", null: false
  85. t.bigint "user_id", null: false
  86. t.integer "visibility"
  87. t.datetime "created_at", precision: 6, null: false
  88. t.datetime "updated_at", precision: 6, null: false
  89. t.index ["license_id"], name: "index_projects_on_license_id"
  90. t.index ["user_id"], name: "index_projects_on_user_id"
  91. end
  92. create_table "projects_technologies", id: false, charset: "utf8mb4", force: :cascade do |t|
  93. t.bigint "project_id", null: false
  94. t.bigint "technology_id", null: false
  95. t.integer "value", limit: 1
  96. t.index ["project_id"], name: "index_projects_technologies_on_project_id"
  97. t.index ["technology_id"], name: "index_projects_technologies_on_technology_id"
  98. end
  99. create_table "resumes", charset: "utf8mb4", force: :cascade do |t|
  100. t.bigint "user_id", null: false
  101. t.string "language"
  102. t.integer "priority"
  103. t.boolean "printable"
  104. t.string "format"
  105. t.datetime "created_at", precision: 6, null: false
  106. t.datetime "updated_at", precision: 6, null: false
  107. t.index ["user_id"], name: "index_resumes_on_user_id"
  108. end
  109. create_table "social_links", charset: "utf8mb4", force: :cascade do |t|
  110. t.string "site_name"
  111. t.string "pattern"
  112. t.string "regexp"
  113. t.string "link_title"
  114. t.datetime "created_at", precision: 6, null: false
  115. t.datetime "updated_at", precision: 6, null: false
  116. end
  117. create_table "technologies", charset: "utf8mb4", force: :cascade do |t|
  118. t.string "name"
  119. t.integer "nature"
  120. t.datetime "created_at", precision: 6, null: false
  121. t.datetime "updated_at", precision: 6, null: false
  122. end
  123. create_table "technologies_users", id: false, charset: "utf8mb4", force: :cascade do |t|
  124. t.bigint "user_id", null: false
  125. t.bigint "technology_id", null: false
  126. t.integer "value", limit: 1
  127. t.index ["technology_id"], name: "index_technologies_users_on_technology_id"
  128. t.index ["user_id"], name: "index_technologies_users_on_user_id"
  129. end
  130. create_table "texts", charset: "utf8mb4", force: :cascade do |t|
  131. t.bigint "user_id"
  132. t.string "key"
  133. t.string "language"
  134. t.text "text"
  135. t.datetime "created_at", precision: 6, null: false
  136. t.datetime "updated_at", precision: 6, null: false
  137. t.index ["user_id"], name: "index_texts_on_user_id"
  138. end
  139. create_table "url_targets", charset: "utf8mb4", force: :cascade do |t|
  140. t.string "name"
  141. t.string "summary"
  142. t.datetime "created_at", precision: 6, null: false
  143. t.datetime "updated_at", precision: 6, null: false
  144. end
  145. create_table "user_social_links", charset: "utf8mb4", force: :cascade do |t|
  146. t.bigint "user_id", null: false
  147. t.bigint "social_link_id", null: false
  148. t.integer "priority"
  149. t.string "link"
  150. t.datetime "created_at", precision: 6, null: false
  151. t.datetime "updated_at", precision: 6, null: false
  152. t.index ["social_link_id"], name: "index_user_social_links_on_social_link_id"
  153. t.index ["user_id"], name: "index_user_social_links_on_user_id"
  154. end
  155. create_table "users", charset: "utf8mb4", force: :cascade do |t|
  156. t.string "username"
  157. t.string "full_name"
  158. t.string "first_name"
  159. t.string "last_name"
  160. t.string "tagline"
  161. t.string "bio"
  162. t.string "country"
  163. t.string "city"
  164. t.string "password"
  165. t.string "salt"
  166. t.boolean "admin"
  167. t.integer "visibility"
  168. t.datetime "created_at", precision: 6, null: false
  169. t.datetime "updated_at", precision: 6, null: false
  170. end
  171. create_table "work_experiences", charset: "utf8mb4", force: :cascade do |t|
  172. t.bigint "user_id", null: false
  173. t.date "start", null: false
  174. t.date "end"
  175. t.string "company", null: false
  176. t.string "role"
  177. t.string "description"
  178. t.string "comment"
  179. t.boolean "professional"
  180. t.boolean "related"
  181. t.boolean "visible"
  182. t.datetime "created_at", precision: 6, null: false
  183. t.datetime "updated_at", precision: 6, null: false
  184. t.string "city"
  185. t.index ["user_id"], name: "index_work_experiences_on_user_id"
  186. end
  187. add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
  188. add_foreign_key "mail_adresses", "users"
  189. add_foreign_key "messages", "users"
  190. add_foreign_key "projects", "licenses"
  191. add_foreign_key "projects", "users"
  192. add_foreign_key "resumes", "users"
  193. add_foreign_key "texts", "users"
  194. add_foreign_key "user_social_links", "social_links"
  195. add_foreign_key "user_social_links", "users"
  196. add_foreign_key "work_experiences", "users"
  197. end