schema.rb 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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: 2021_12_30_103227) 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 "tags", charset: "utf8mb4", force: :cascade do |t|
  118. # t.bigint "project_id", null: false
  119. # t.string "tag"
  120. # t.datetime "created_at", precision: 6, null: false
  121. # t.datetime "updated_at", precision: 6, null: false
  122. # t.index ["project_id"], name: "index_tags_on_project_id"
  123. #end
  124. create_table "technologies", charset: "utf8mb4", force: :cascade do |t|
  125. t.string "name"
  126. t.integer "nature"
  127. t.datetime "created_at", precision: 6, null: false
  128. t.datetime "updated_at", precision: 6, null: false
  129. end
  130. create_table "technologies_users", id: false, charset: "utf8mb4", force: :cascade do |t|
  131. t.bigint "user_id", null: false
  132. t.bigint "technology_id", null: false
  133. t.integer "value", limit: 1
  134. t.index ["technology_id"], name: "index_technologies_users_on_technology_id"
  135. t.index ["user_id"], name: "index_technologies_users_on_user_id"
  136. end
  137. create_table "texts", charset: "utf8mb4", force: :cascade do |t|
  138. t.bigint "user_id", null: true
  139. t.string "key"
  140. t.string "language"
  141. t.text "text"
  142. t.datetime "created_at", precision: 6, null: false
  143. t.datetime "updated_at", precision: 6, null: false
  144. t.index ["user_id"], name: "index_texts_on_user_id"
  145. end
  146. create_table "url_targets", charset: "utf8mb4", force: :cascade do |t|
  147. t.string "name"
  148. t.string "summary"
  149. t.datetime "created_at", precision: 6, null: false
  150. t.datetime "updated_at", precision: 6, null: false
  151. end
  152. create_table "user_social_links", charset: "utf8mb4", force: :cascade do |t|
  153. t.bigint "user_id", null: false
  154. t.bigint "social_link_id", null: false
  155. t.integer "priority"
  156. t.string "link"
  157. t.datetime "created_at", precision: 6, null: false
  158. t.datetime "updated_at", precision: 6, null: false
  159. t.index ["social_link_id"], name: "index_user_social_links_on_social_link_id"
  160. t.index ["user_id"], name: "index_user_social_links_on_user_id"
  161. end
  162. create_table "users", charset: "utf8mb4", force: :cascade do |t|
  163. t.string "username"
  164. t.string "full_name"
  165. t.string "first_name"
  166. t.string "last_name"
  167. t.string "tagline"
  168. t.string "bio"
  169. t.string "country"
  170. t.string "city"
  171. t.string "password"
  172. t.string "salt"
  173. t.boolean "admin"
  174. t.integer "visibility"
  175. t.datetime "created_at", precision: 6, null: false
  176. t.datetime "updated_at", precision: 6, null: false
  177. end
  178. add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
  179. add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
  180. add_foreign_key "mail_adresses", "users"
  181. add_foreign_key "messages", "users"
  182. add_foreign_key "projects", "licenses"
  183. add_foreign_key "projects", "users"
  184. add_foreign_key "resumes", "users"
  185. #add_foreign_key "tags", "projects"
  186. add_foreign_key "texts", "users"
  187. add_foreign_key "user_social_links", "social_links"
  188. add_foreign_key "user_social_links", "users"
  189. end