API de comptabilité horaire.
Ви не можете вибрати більше 25 тем Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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_08_03_152520) do
  13. # These are extensions that must be enabled in order to support this database
  14. enable_extension "plpgsql"
  15. create_table "activities", force: :cascade do |t|
  16. t.string "name", null: false
  17. t.string "client"
  18. t.string "description"
  19. t.bigint "author_id", null: false
  20. t.datetime "created_at", precision: 6, null: false
  21. t.datetime "updated_at", precision: 6, null: false
  22. t.index ["author_id"], name: "index_activities_on_author_id"
  23. t.index ["name"], name: "index_activities_on_name"
  24. end
  25. create_table "joined_user_activities", force: :cascade do |t|
  26. t.bigint "user_id"
  27. t.bigint "activity_id"
  28. t.datetime "created_at", precision: 6, null: false
  29. t.datetime "updated_at", precision: 6, null: false
  30. t.index ["activity_id"], name: "index_joined_user_activities_on_activity_id"
  31. t.index ["user_id"], name: "index_joined_user_activities_on_user_id"
  32. end
  33. create_table "memberships", force: :cascade do |t|
  34. t.bigint "member_id"
  35. t.bigint "team_id"
  36. t.boolean "can_edit", default: false
  37. t.datetime "created_at", precision: 6, null: false
  38. t.datetime "updated_at", precision: 6, null: false
  39. t.index ["member_id"], name: "index_memberships_on_member_id"
  40. t.index ["team_id"], name: "index_memberships_on_team_id"
  41. end
  42. create_table "tasks", force: :cascade do |t|
  43. t.string "name", null: false
  44. t.text "description"
  45. t.datetime "start_time", null: false
  46. t.datetime "end_time"
  47. t.boolean "is_paid", default: false
  48. t.bigint "paid_by_id"
  49. t.bigint "activity_id", null: false
  50. t.bigint "owner_id", null: false
  51. t.datetime "created_at", precision: 6, null: false
  52. t.datetime "updated_at", precision: 6, null: false
  53. t.index ["activity_id"], name: "index_tasks_on_activity_id"
  54. t.index ["name"], name: "index_tasks_on_name"
  55. t.index ["owner_id"], name: "index_tasks_on_owner_id"
  56. t.index ["paid_by_id"], name: "index_tasks_on_paid_by_id"
  57. end
  58. create_table "teams", force: :cascade do |t|
  59. t.string "name", null: false
  60. t.text "description"
  61. t.datetime "created_at", precision: 6, null: false
  62. t.datetime "updated_at", precision: 6, null: false
  63. t.index ["name"], name: "index_teams_on_name", unique: true
  64. end
  65. create_table "users", force: :cascade do |t|
  66. t.string "email", null: false
  67. t.string "username", null: false
  68. t.string "password_digest"
  69. t.boolean "is_admin", default: false
  70. t.datetime "created_at", precision: 6, null: false
  71. t.datetime "updated_at", precision: 6, null: false
  72. t.index ["email"], name: "index_users_on_email", unique: true
  73. t.index ["username"], name: "index_users_on_username", unique: true
  74. end
  75. end