-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.rb
58 lines (52 loc) · 2.32 KB
/
schema.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2020_10_02_202938) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "applications", force: :cascade do |t|
t.integer "applicant_id"
t.boolean "enabled", default: true
t.bigint "jobpost_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["applicant_id", "jobpost_id"], name: "index_applications_on_applicant_id_and_jobpost_id", unique: true
t.index ["jobpost_id"], name: "index_applications_on_jobpost_id"
end
create_table "jobposts", force: :cascade do |t|
t.string "name", null: false
t.boolean "enabled", default: true
t.string "image", null: false
t.integer "author_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "likes", force: :cascade do |t|
t.integer "admin_id"
t.integer "evaluation", null: false
t.bigint "application_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["application_id"], name: "index_likes_on_application_id"
end
create_table "users", force: :cascade do |t|
t.string "email", null: false
t.string "name"
t.integer "role", null: false
t.string "avatar", null: false
t.string "password_digest", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["email"], name: "index_users_on_email", unique: true
end
add_foreign_key "applications", "jobposts"
add_foreign_key "likes", "applications"
end