-
Notifications
You must be signed in to change notification settings - Fork 22
Schema
Clipsey edited this page Sep 9, 2019
·
8 revisions
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
username |
string | not null, indexed, unique |
email |
string | not null, indexed, unique |
language |
string | not null |
broadcast_status |
string | not null |
homepage_status |
bool | not null |
stream_title |
string | not null |
stream_category |
string | not null |
viewers |
integer | not null |
profile_picture |
string | |
stream_key |
string | not null |
password_digest |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
- index on
username, unique: true
- index on
email, unique: true
- index on
session_token, unique: true
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
followed_id |
integer | not null, indexed, foreign key |
follower_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
followed_id
referencesusers
-
follower_id
referencesusers
- index on
followed_id
- index on
follower_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
friend_one_id |
integer | not null, indexed, foreign key |
friend_two_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
friend_one_id
referencesusers
-
friend_two_id
referencesusers
- index on
friend_one_id
- index on
friend_two_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
owner_id |
integer | not null, indexed, foreign key |
views |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
owner_id
referencesusers
- index on
owner_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
tag_name |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
tag_id |
integer | not null |
user_id |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
tag_id
referencesstreamTags
-
user_id
referencesusers
- index on
tag_id
- index on `user_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
subscriber_id |
integer | not null, indexed, foreign key |
subscribee_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
subscriber_id
referencesusers
-
subscribee_id
referencesusers
- index on
subscriber_id
- index on
subscribee_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
title |
string | not null |
viewers |
integer | not null |
picture |
string | not null |
homepage_status |
bool | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
name |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
tag_id |
integer | not null |
category_id |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
tag_id
referencescategoriesTags
-
category_id
referencescategories
- index on
tag_id
- index on `category_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
category_id |
integer | not null, indexed, foreign key |
broadcaster_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
category_id
referencescategories
-
broadcaster_id
referencesusers
- index on
category_id
- index on
broadcaster_id
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
category_id |
integer | not null, indexed, foreign key |
follower_id |
integer | not null, indexed, foreign key |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
category_id
referencescategories
-
follower_id
referencesfollowers
- index on
category_id
- index on
follower_id
Bits/Loot-Inventory Bonus