schema.rb 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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_12_114959) 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 "project_urls", charset: "utf8mb4", force: :cascade do |t|
  54. t.bigint "project_id", null: false
  55. t.string "url"
  56. t.bigint "urlTarget_id", null: false
  57. t.datetime "created_at", precision: 6, null: false
  58. t.datetime "updated_at", precision: 6, null: false
  59. t.index ["project_id"], name: "index_project_urls_on_project_id"
  60. t.index ["urlTarget_id"], name: "index_project_urls_on_urlTarget_id"
  61. end
  62. create_table "projects", charset: "utf8mb4", force: :cascade do |t|
  63. t.string "permalink"
  64. t.integer "priority"
  65. t.integer "nature"
  66. t.string "title"
  67. t.string "logo"
  68. t.string "header"
  69. t.text "text"
  70. t.bigint "license_id", null: false
  71. t.bigint "user_id", null: false
  72. t.integer "visibility"
  73. t.datetime "created_at", precision: 6, null: false
  74. t.datetime "updated_at", precision: 6, null: false
  75. t.index ["license_id"], name: "index_projects_on_license_id"
  76. t.index ["user_id"], name: "index_projects_on_user_id"
  77. end
  78. create_table "projects_technologies", id: false, charset: "utf8mb4", force: :cascade do |t|
  79. t.bigint "project_id", null: false
  80. t.bigint "technology_id", null: false
  81. t.integer "value", limit: 1
  82. t.index ["project_id"], name: "index_projects_technologies_on_project_id"
  83. t.index ["technology_id"], name: "index_projects_technologies_on_technology_id"
  84. end
  85. create_table "tags", charset: "utf8mb4", force: :cascade do |t|
  86. t.bigint "project_id", null: false
  87. t.string "tag"
  88. t.datetime "created_at", precision: 6, null: false
  89. t.datetime "updated_at", precision: 6, null: false
  90. t.index ["project_id"], name: "index_tags_on_project_id"
  91. end
  92. create_table "technologies", charset: "utf8mb4", force: :cascade do |t|
  93. t.string "name"
  94. t.integer "nature"
  95. t.datetime "created_at", precision: 6, null: false
  96. t.datetime "updated_at", precision: 6, null: false
  97. end
  98. create_table "technologies_users", id: false, charset: "utf8mb4", force: :cascade do |t|
  99. t.bigint "user_id", null: false
  100. t.bigint "technology_id", null: false
  101. t.integer "value", limit: 1
  102. t.index ["technology_id"], name: "index_technologies_users_on_technology_id"
  103. t.index ["user_id"], name: "index_technologies_users_on_user_id"
  104. end
  105. create_table "texts", charset: "utf8mb4", force: :cascade do |t|
  106. t.bigint "user_id", null: false
  107. t.string "key"
  108. t.string "language"
  109. t.text "text"
  110. t.datetime "created_at", precision: 6, null: false
  111. t.datetime "updated_at", precision: 6, null: false
  112. t.index ["user_id"], name: "index_texts_on_user_id"
  113. end
  114. create_table "url_targets", charset: "utf8mb4", force: :cascade do |t|
  115. t.string "name"
  116. t.string "summary"
  117. t.datetime "created_at", precision: 6, null: false
  118. t.datetime "updated_at", precision: 6, null: false
  119. end
  120. create_table "users", charset: "utf8mb4", force: :cascade do |t|
  121. t.string "username"
  122. t.string "full_name"
  123. t.string "first_name"
  124. t.string "last_name"
  125. t.string "tagline"
  126. t.string "bio"
  127. t.string "country"
  128. t.string "city"
  129. t.string "password"
  130. t.string "salt"
  131. t.boolean "admin"
  132. t.integer "visibility"
  133. t.datetime "created_at", precision: 6, null: false
  134. t.datetime "updated_at", precision: 6, null: false
  135. end
  136. add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
  137. add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
  138. add_foreign_key "mail_adresses", "users"
  139. add_foreign_key "projects", "licenses"
  140. add_foreign_key "projects", "users"
  141. add_foreign_key "tags", "projects"
  142. add_foreign_key "texts", "users"
  143. end