-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.rb
112 lines (101 loc) · 4.31 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
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
102
103
104
105
106
107
108
109
110
111
112
# 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: 20170612135131) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "categories", force: :cascade do |t|
t.string "slug"
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "file_commits", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "commit_message"
t.string "path"
t.integer "version"
t.integer "stream_file_id"
t.integer "timestamp"
end
create_table "stream_files", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
t.string "format"
t.integer "stream_id"
end
create_table "streams", force: :cascade do |t|
t.integer "user_id"
t.integer "category_id"
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "twitch_stream_id"
t.datetime "twitch_created_at"
t.string "twitch_name"
t.integer "viewers", default: 0
t.boolean "live", default: true
t.integer "max_viewers", default: 0
t.string "description"
t.string "thumbnail"
end
create_table "streams_sub_categories", id: false, force: :cascade do |t|
t.integer "sub_category_id"
t.integer "stream_id"
t.index ["stream_id"], name: "index_streams_sub_categories_on_stream_id", using: :btree
t.index ["sub_category_id"], name: "index_streams_sub_categories_on_sub_category_id", using: :btree
end
create_table "sub_categories", force: :cascade do |t|
t.string "slug"
t.string "name"
t.integer "category_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["category_id"], name: "index_sub_categories_on_category_id", using: :btree
end
create_table "tags_streams", force: :cascade do |t|
t.integer "stream_id"
t.integer "sub_category_id"
t.index ["stream_id"], name: "index_tags_streams_on_stream_id", using: :btree
t.index ["sub_category_id"], name: "index_tags_streams_on_sub_category_id", using: :btree
end
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "authentication_token", limit: 30
t.string "first_name"
t.string "last_name"
t.string "pseudo"
t.string "avatar"
t.boolean "live"
t.string "channel"
t.string "stream_description"
t.string "site_url"
t.string "schedule"
t.string "community"
t.string "rules"
t.index ["authentication_token"], name: "index_users_on_authentication_token", unique: true, using: :btree
t.index ["email"], name: "index_users_on_email", unique: true, using: :btree
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
end
end