schema.rb
3.63 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# 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.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180611152633) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "bets", force: :cascade do |t|
t.integer "match_id", null: false
t.integer "user_id", null: false
t.integer "score_local", null: false
t.integer "score_visit", null: false
t.integer "result"
t.integer "points"
end
create_table "groups", force: :cascade do |t|
t.integer "pool_id"
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["pool_id"], name: "index_groups_on_pool_id", using: :btree
end
create_table "groups_users", force: :cascade do |t|
t.integer "group_id"
t.integer "user_id"
t.index ["group_id"], name: "index_groups_users_on_group_id", using: :btree
t.index ["user_id"], name: "index_groups_users_on_user_id", using: :btree
end
create_table "heimdall_engine_role_abilities", force: :cascade do |t|
t.integer "role_id"
t.string "key"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["key"], name: "index_heimdall_engine_role_abilities_on_key", using: :btree
t.index ["role_id"], name: "index_heimdall_engine_role_abilities_on_role_id", using: :btree
end
create_table "heimdall_engine_roles", force: :cascade do |t|
t.string "name"
t.boolean "erasable", default: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "deleted_at"
t.index ["deleted_at"], name: "index_heimdall_engine_roles_on_deleted_at", using: :btree
end
create_table "matches", force: :cascade do |t|
t.string "local", null: false
t.string "visit", null: false
t.date "date", null: false
t.integer "score_local"
t.integer "score_visit"
t.integer "result"
t.integer "pool_id", null: false
end
create_table "pools", force: :cascade do |t|
t.string "name", null: false
t.datetime "editable_until", null: false
t.boolean "active"
end
create_table "users", force: :cascade do |t|
t.string "name"
t.string "mail"
t.string "password_hash"
t.string "password_salt"
t.datetime "deleted_at"
end
create_table "users_roles", force: :cascade do |t|
t.integer "user_id"
t.integer "role_id"
t.index ["role_id"], name: "index_users_roles_on_role_id", using: :btree
t.index ["user_id"], name: "index_users_roles_on_user_id", using: :btree
end
create_table "versions", force: :cascade do |t|
t.string "item_type", null: false
t.integer "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
end
end