Вы находитесь на странице: 1из 14

Table "public.

alembic_version"
Column
|
Type
| Modifiers | Storage | Stats target | Des
cription
-------------+-----------------------+-----------+----------+--------------+-----------version_num | character varying(32) | not null | extended |
|
Table "public.card_collector"
Column |
Type
| Modifiers | Storage | Stats target | Descr
iption
-----------+-----------------------+-----------+----------+--------------+-----------setid
| character varying(10) | not null | extended |
|
collector | character varying(10) | not null | extended |
|
cardid
| integer
| not null | plain
|
|
Indexes:
"card_collector_pkey" PRIMARY KEY, btree (setid, collector)
"card_collector_cardid_idx" btree (cardid)
Foreign-key constraints:
"card_collector_cardid_fkey" FOREIGN KEY (cardid) REFERENCES cards(id) ON DE
LETE CASCADE
Index "public.card_collector_cardid_idx"
Column | Type | Definition | Storage
--------+---------+------------+--------cardid | integer | cardid
| plain
btree, for table "public.card_collector"
Index "public.card_collector_pkey"
Column |
Type
| Definition | Storage
-----------+-----------------------+------------+---------setid
| character varying(10) | setid
| extended
collector | character varying(10) | collector | extended
primary key, btree, for table "public.card_collector"
Table "public.card_multiverse"
Column | Type | Modifiers | Storage | Stats target | Description
--------+---------+-----------+---------+--------------+------------id
| integer | not null | plain |
|
cardid | integer | not null | plain |
|
Indexes:
"card_multiverse_pkey" PRIMARY KEY, btree (id)
"card_multiverse_cardid_idx" btree (cardid)
Foreign-key constraints:
"card_multiverse_cardid_fkey" FOREIGN KEY (cardid) REFERENCES cards(id) ON D
ELETE CASCADE
Index "public.card_multiverse_cardid_idx"
Column | Type | Definition | Storage
--------+---------+------------+--------cardid | integer | cardid
| plain
btree, for table "public.card_multiverse"
Index "public.card_multiverse_pkey"
Column
| Type | Definition | Storage
--------------+---------+------------+--------multiverseid | integer | id
| plain
primary key, btree, for table "public.card_multiverse"
Table "public.cards"

Column

Type
|
Modifiers
| Storage | Stats target | Description
--------------+------------------------+-------------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('cards_cardid_
seq'::regclass) | plain
|
|
filteredname | character varying(255) | not null
| extended |
|
name
| text
| collate en_US.utf8 not null
| extended |
|
text
| text
| collate en_US.utf8 not null
| extended |
|
lastprinted | date
|
| plain
|
|
Indexes:
"cards_pkey" PRIMARY KEY, btree (id)
"cards_name_idx" UNIQUE, btree (filteredname)
Referenced by:
TABLE "card_collector" CONSTRAINT "card_collector_cardid_fkey" FOREIGN KEY (
cardid) REFERENCES cards(id) ON DELETE CASCADE
TABLE "card_multiverse" CONSTRAINT "card_multiverse_cardid_fkey" FOREIGN KEY
(cardid) REFERENCES cards(id) ON DELETE CASCADE
Sequence "public.cards_cardid_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| cards_cardid_seq
| plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.cards.id
Index "public.cards_name_idx"
Column
|
Type
| Definition | Storage
--------------+------------------------+--------------+---------filteredname | character varying(255) | filteredname | extended
unique, btree, for table "public.cards"
Index "public.cards_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------cardid | integer | id
| plain
primary key, btree, for table "public.cards"
Table "public.disabled_stats"
Column | Type | Modifiers | Storage | Stats target | Description
---------+---------+-----------+---------+--------------+------------show_id | integer | not null | plain |
|
stat_id | integer | not null | plain |
|
Indexes:
"disabled_stats_pk" PRIMARY KEY, btree (show_id, stat_id)
"disabled_stats_show_id_idx" btree (show_id)
"disabled_stats_stat_id_idx" btree (stat_id)
Foreign-key constraints:

"disabled_stats_show_id_fkey" FOREIGN KEY (show_id) REFERENCES shows(id) ON


UPDATE CASCADE ON DELETE CASCADE
"disabled_stats_stat_id_fkey" FOREIGN KEY (stat_id) REFERENCES stats(id) ON
UPDATE CASCADE ON DELETE CASCADE
Index "public.disabled_stats_pk"
Column | Type | Definition | Storage
---------+---------+------------+--------show_id | integer | show_id
| plain
stat_id | integer | stat_id
| plain
primary key, btree, for table "public.disabled_stats"
Index "public.disabled_stats_show_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------show_id | integer | show_id
| plain
btree, for table "public.disabled_stats"
Index "public.disabled_stats_stat_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------stat_id | integer | stat_id
| plain
btree, for table "public.disabled_stats"
Table "public.events"
Type
|
Modifiers
| Storage | Stats target | Description
--------+--------------------------+----------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('events_id_seq'::r
egclass) | plain
|
|
event | text
| not null
| extended |
|
data | jsonb
| not null
| extended |
|
time | timestamp with time zone | not null
| plain
|
|
Indexes:
"events_pkey" PRIMARY KEY, btree (id)
Column |

Sequence "public.events_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| events_id_seq
| plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.events.id
Index "public.events_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.events"

Table "public.game_per_show_data"
Column
| Type | Modifiers | Storage | Stats target | Description
--------------+---------+-----------+----------+--------------+------------game_id
| integer | not null | plain
|
|
show_id
| integer | not null | plain
|
|
display_name | text
|
| extended |
|
verified
| boolean |
| plain
|
|
Indexes:
"game_per_show_data_pk" PRIMARY KEY, btree (game_id, show_id)
"game_per_show_data_game_id_idx" btree (game_id)
"game_per_show_data_show_id_idx" btree (show_id)
Foreign-key constraints:
"game_per_show_data_game_id_fkey" FOREIGN KEY (game_id) REFERENCES games(id)
ON UPDATE CASCADE ON DELETE CASCADE
"game_per_show_data_show_id_fkey" FOREIGN KEY (show_id) REFERENCES shows(id)
ON UPDATE CASCADE ON DELETE CASCADE
Index "public.game_per_show_data_game_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
btree, for table "public.game_per_show_data"
Index "public.game_per_show_data_pk"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
show_id | integer | show_id
| plain
primary key, btree, for table "public.game_per_show_data"
Index "public.game_per_show_data_show_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------show_id | integer | show_id
| plain
btree, for table "public.game_per_show_data"
Table "public.game_stats"
Column | Type | Modifiers | Storage | Stats target | Description
---------+---------+-----------+---------+--------------+------------game_id | integer | not null | plain |
|
show_id | integer | not null | plain |
|
stat_id | integer | not null | plain |
|
count | integer | not null | plain |
|
Indexes:
"game_stats_pk" PRIMARY KEY, btree (game_id, show_id, stat_id)
"game_stats_game_id_idx" btree (game_id)
"game_stats_show_id_idx" btree (show_id)
"game_stats_stat_id_idx" btree (stat_id)
Foreign-key constraints:
"game_stats_game_id_fkey" FOREIGN KEY (game_id) REFERENCES games(id) ON UPDA
TE CASCADE ON DELETE CASCADE
"game_stats_show_id_fkey" FOREIGN KEY (show_id) REFERENCES shows(id) ON UPDA
TE CASCADE ON DELETE CASCADE
"game_stats_stat_id_fkey" FOREIGN KEY (stat_id) REFERENCES shows(id) ON UPDA
TE CASCADE ON DELETE CASCADE
Index "public.game_stats_game_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+---------

game_id | integer | game_id


| plain
btree, for table "public.game_stats"
Index "public.game_stats_pk"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
show_id | integer | show_id
| plain
stat_id | integer | stat_id
| plain
primary key, btree, for table "public.game_stats"
Index "public.game_stats_show_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------show_id | integer | show_id
| plain
btree, for table "public.game_stats"
Index "public.game_stats_stat_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------stat_id | integer | stat_id
| plain
btree, for table "public.game_stats"
Table "public.game_votes"
Column | Type | Modifiers | Storage | Stats target | Description
---------+---------+-----------+---------+--------------+------------game_id | integer | not null | plain |
|
show_id | integer | not null | plain |
|
user_id | integer | not null | plain |
|
vote
| boolean | not null | plain |
|
Indexes:
"game_votes_pk" PRIMARY KEY, btree (game_id, show_id, user_id)
"game_votes_game_id_idx" btree (game_id)
"game_votes_show_id_idx" btree (show_id)
"game_votes_user_id_idx" btree (user_id)
Foreign-key constraints:
"game_votes_game_id_fkey" FOREIGN KEY (game_id) REFERENCES games(id) ON UPDA
TE CASCADE ON DELETE CASCADE
"game_votes_show_id_fkey" FOREIGN KEY (show_id) REFERENCES shows(id) ON UPDA
TE CASCADE ON DELETE CASCADE
"game_votes_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id) ON UPDA
TE CASCADE ON DELETE CASCADE
Index "public.game_votes_game_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
btree, for table "public.game_votes"
Index "public.game_votes_pk"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
show_id | integer | show_id
| plain
user_id | integer | user_id
| plain
primary key, btree, for table "public.game_votes"
Index "public.game_votes_show_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+---------

show_id | integer | show_id


| plain
btree, for table "public.game_votes"
Index "public.game_votes_user_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------user_id | integer | user_id
| plain
btree, for table "public.game_votes"
Table "public.games"
Column | Type |
Modifiers
| Storage
| Stats target | Description
--------+---------+----------------------------------------------------+---------+--------------+------------id
| integer | not null default nextval('games_id_seq'::regclass) | plain
|
|
name | text
| not null
| extende
d |
|
Indexes:
"games_pkey" PRIMARY KEY, btree (id)
"games_name_key" UNIQUE CONSTRAINT, btree (name)
Referenced by:
TABLE "game_per_show_data" CONSTRAINT "game_per_show_data_game_id_fkey" FORE
IGN KEY (game_id) REFERENCES games(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_stats" CONSTRAINT "game_stats_game_id_fkey" FOREIGN KEY (game_id
) REFERENCES games(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_votes" CONSTRAINT "game_votes_game_id_fkey" FOREIGN KEY (game_id
) REFERENCES games(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "quotes" CONSTRAINT "quotes_game_id_fkey" FOREIGN KEY (game_id) REFERE
NCES games(id) ON UPDATE CASCADE ON DELETE CASCADE
Sequence "public.games_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+----------------------+--------sequence_name | name
| games_id_seq
| plain
last_value
| bigint | -1
| plain
start_value | bigint | -1
| plain
increment_by | bigint | -1
| plain
max_value
| bigint | -1
| plain
min_value
| bigint | -9223372036854775807 | plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.games.id
Index "public.games_name_key"
Column | Type | Definition | Storage
--------+------+------------+---------name | text | name
| extended
unique, btree, for table "public.games"
Index "public.games_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.games"
Table "public.highlights
"

Column

Type
|
Modifiers
| Storage | Stats target | Description
-------------+--------------------------+--------------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('highlights_i
d_seq'::regclass) | plain
|
|
title
| text
| not null
| extended |
|
description | text
| not null
| extended |
|
time
| timestamp with time zone | not null
| plain
|
|
user_id
| integer
| not null
| plain
|
|
Indexes:
"highlights_pkey" PRIMARY KEY, btree (id)
"highlights_user_idx" btree (user_id)
Foreign-key constraints:
"highlights_user_fkey" FOREIGN KEY (user_id) REFERENCES users(id)
Sequence "public.highlights_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| highlights_id_seq | plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.highlights.id
Index "public.highlights_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.highlights"
Index "public.highlights_user_idx"
Column | Type | Definition | Storage
--------+---------+------------+--------user | integer | user_id
| plain
btree, for table "public.highlights"
Table "public.histor
y"
Column

Type
|
Modifiers
| Storage | Stats target | Description
------------+--------------------------+-------------------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('history_histo
rykey_seq'::regclass) | plain
|
|
section
| text
| collate en_US.utf8 not null
| extended |
|
changetime | timestamp with time zone | not null
| plain
|
|
jsondata | jsonb
|

| extended |
changeuser | integer

|
|

| plain
|
|
Indexes:
"history_pkey" PRIMARY KEY, btree (id)
"history_changeuser_idx" btree (changeuser)
"history_idx1" btree (section, changetime)
Foreign-key constraints:
"history_changeuser2_fkey" FOREIGN KEY (changeuser) REFERENCES users(id)
Index "public.history_changeuser_idx"
Column | Type | Definition | Storage
------------+---------+------------+--------changeuser | integer | changeuser | plain
btree, for table "public.history"
Sequence "public.history_historykey_seq"
Column
| Type |
Value
| Storage
---------------+---------+------------------------+--------sequence_name | name
| history_historykey_seq | plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807
| plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.history.id
Index "public.history_idx1"
Column |
Type
| Definition | Storage
------------+--------------------------+------------+---------section
| text
| section
| extended
changetime | timestamp with time zone | changetime | plain
btree, for table "public.history"
Index "public.history_pkey"
Column | Type | Definition | Storage
------------+---------+------------+--------historykey | integer | id
| plain
primary key, btree, for table "public.history"
Table "public.log"
|
Type
|
Modifiers
| Storage | Stats target | Description
-------------+--------------------------+-------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('log_id_seq':
:regclass) | plain
|
|
time
| timestamp with time zone | not null
| plain
|
|
source
| text
| collate en_US.utf8 not null
| extended |
|
target
| text
| collate en_US.utf8 not null
| extended |
|
message
| text
| collate en_US.utf8 not null
| extended |
|
messagehtml | text
| collate en_US.utf8 not null
Column

| extended |
|
specialuser | text[]
| extended |
|
usercolor | text
| extended |
|
emoteset
| integer[]
| extended |
|
emotes
| text
| extended |
|
displayname | text
| extended |
|
Indexes:
"log_pkey" PRIMARY KEY, btree (id)
"log_idx1" btree ("time")

|
| collate en_US.utf8
|
|
|

Sequence "public.log_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| log_id_seq
| plain
last_value
| bigint | 12
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 25
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | t
| plain
Owned by: public.log.id
Index "public.log_idx1"
Column |
Type
| Definition | Storage
--------+--------------------------+------------+--------time | timestamp with time zone | "time"
| plain
btree, for table "public.log"
Index "public.log_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.log"
Table "public.patreo
n_users"
Column
|
Type
|
Modifi
ers
| Storage | Stats target | Description
---------------------+--------------------------+-----------------------------------------------------------+----------+--------------+------------id
| integer
| not null default nextval('patr
eon_users_id_seq'::regclass) | plain
|
|
patreon_id
| text
|
| extended |
|
full_name
| text
| not null
| extended |
|
access_token
| text
|
| extended |
|
refresh_token
| text
|
| extended |
|
token_expires
| timestamp with time zone |
| plain
|
|

pledge_start

| timestamp with time zone |


| plain
|
|
last_announce_month | integer
|
| plain
|
|
Indexes:
"patreon_users_pkey" PRIMARY KEY, btree (id)
"patreon_users_patreon_id_key" UNIQUE CONSTRAINT, btree (patreon_id)
Referenced by:
TABLE "users" CONSTRAINT "users_patreon_user_fkey" FOREIGN KEY (patreon_user
_id) REFERENCES patreon_users(id) ON UPDATE CASCADE ON DELETE SET NULL
Sequence "public.patreon_users_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+----------------------+--------sequence_name | name
| patreon_users_id_seq | plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.patreon_users.id
Index "public.patreon_users_patreon_id_key"
Column | Type | Definition | Storage
------------+------+------------+---------patreon_id | text | patreon_id | extended
unique, btree, for table "public.patreon_users"
Index "public.patreon_users_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.patreon_users"
Table "public.quotes"
Column
| Type |
Modifiers
|
Storage | Stats target | Description
-------------+---------+------------------------------------------------------+---------+--------------+------------id
| integer | not null default nextval('quotes_qid_seq'::regclass) |
plain
|
|
quote
| text
| not null
|
extended |
|
attrib_name | text
|
|
extended |
|
attrib_date | date
|
|
plain
|
|
deleted
| boolean | not null default false
|
plain
|
|
context
| text
|
|
extended |
|
game_id
| integer |
|
plain
|
|
show_id
| integer |
|
plain
|
|
Indexes:

"quotes_pkey" PRIMARY KEY, btree (id)


"quotes_ftx_idx" gin (to_tsvector('english'::regconfig, quote))
"quotes_game_id_idx" btree (game_id)
"quotes_show_id_idx" btree (show_id)
Foreign-key constraints:
"quotes_game_id_fkey" FOREIGN KEY (game_id) REFERENCES games(id) ON UPDATE C
ASCADE ON DELETE CASCADE
"quotes_show_id_fkey" FOREIGN KEY (show_id) REFERENCES shows(id) ON UPDATE C
ASCADE ON DELETE CASCADE
Index "public.quotes_ftx_idx"
Column
| Type |
Definition
| Storage
-------------+------+------------------------------------------+---------to_tsvector | text | to_tsvector('english'::regconfig, quote) | extended
gin, for table "public.quotes"
Index "public.quotes_game_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------game_id | integer | game_id
| plain
btree, for table "public.quotes"
Index "public.quotes_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------qid
| integer | id
| plain
primary key, btree, for table "public.quotes"
Sequence "public.quotes_qid_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| quotes_qid_seq
| plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.quotes.id
Index "public.quotes_show_id_idx"
Column | Type | Definition | Storage
---------+---------+------------+--------show_id | integer | show_id
| plain
btree, for table "public.quotes"
Table "public.shows"
Column | Type |
Modifiers
| Stor
age | Stats target | Description
-----------+---------+----------------------------------------------------+---------+--------------+------------id
| integer | not null default nextval('shows_id_seq'::regclass) | plai
n
|
|
string_id | text
| not null
| exte
nded |
|
name
| text
| not null
| exte
nded |
|

Indexes:
"shows_pkey" PRIMARY KEY, btree (id)
"shows_string_id_key" UNIQUE CONSTRAINT, btree (string_id)
Referenced by:
TABLE "disabled_stats" CONSTRAINT "disabled_stats_show_id_fkey" FOREIGN KEY
(show_id) REFERENCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_per_show_data" CONSTRAINT "game_per_show_data_show_id_fkey" FORE
IGN KEY (show_id) REFERENCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_stats" CONSTRAINT "game_stats_show_id_fkey" FOREIGN KEY (show_id
) REFERENCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_stats" CONSTRAINT "game_stats_stat_id_fkey" FOREIGN KEY (stat_id
) REFERENCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "game_votes" CONSTRAINT "game_votes_show_id_fkey" FOREIGN KEY (show_id
) REFERENCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "quotes" CONSTRAINT "quotes_show_id_fkey" FOREIGN KEY (show_id) REFERE
NCES shows(id) ON UPDATE CASCADE ON DELETE CASCADE
Sequence "public.shows_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| shows_id_seq
| plain
last_value
| bigint | 60
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 31
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | t
| plain
Owned by: public.shows.id
Index "public.shows_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.shows"
Index "public.shows_string_id_key"
Column | Type | Definition | Storage
-----------+------+------------+---------string_id | text | string_id | extended
unique, btree, for table "public.shows"
Table "public.stats"
Column | Type |
Modifiers
| Stor
age | Stats target | Description
-----------+---------+----------------------------------------------------+---------+--------------+------------id
| integer | not null default nextval('stats_id_seq'::regclass) | plai
n
|
|
string_id | text
| not null
| exte
nded |
|
singular | text
|
| exte
nded |
|
plural
| text
|
| exte
nded |
|
emote
| text
|
| exte
nded |
|
Indexes:

"stats_pkey" PRIMARY KEY, btree (id)


"stats_string_id_key" UNIQUE CONSTRAINT, btree (string_id)
Referenced by:
TABLE "disabled_stats" CONSTRAINT "disabled_stats_stat_id_fkey" FOREIGN KEY
(stat_id) REFERENCES stats(id) ON UPDATE CASCADE ON DELETE CASCADE
Sequence "public.stats_id_seq"
Column
| Type |
Value
| Storage
---------------+---------+---------------------+--------sequence_name | name
| stats_id_seq
| plain
last_value
| bigint | 1
| plain
start_value | bigint | 1
| plain
increment_by | bigint | 1
| plain
max_value
| bigint | 9223372036854775807 | plain
min_value
| bigint | 1
| plain
cache_value | bigint | 1
| plain
log_cnt
| bigint | 0
| plain
is_cycled
| boolean | f
| plain
is_called
| boolean | f
| plain
Owned by: public.stats.id
Index "public.stats_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.stats"
Index "public.stats_string_id_key"
Column | Type | Definition | Storage
-----------+------+------------+---------string_id | text | string_id | extended
unique, btree, for table "public.stats"
Table "public.storm"
Column
| Type |
Modifiers
| Storage | Stats target |
Description
-----------------------+---------+--------------------+---------+--------------+
------------date
| date
| not null
| plain |
|
twitch-subscription

| integer | not null default 0 | plain

twitch-resubscription | integer | not null default 0 | plain

twitch-follow

| integer | not null default 0 | plain

twitch-message

| integer | not null default 0 | plain

patreon-pledge

| integer | not null default 0 | plain

twitch-cheer

| integer | not null default 0 | plain

Indexes:
"storm_pkey" PRIMARY KEY, btree (date)
Index "public.storm_pkey"
Column | Type | Definition | Storage
--------+------+------------+--------date | date | date
| plain
primary key, btree, for table "public.storm"

Table "public.users"
Column
| Type |
Modifiers
| Storage | Stats target |
Description
-----------------+---------+------------------------+----------+--------------+-----------id
| integer | not null
| plain
|
|
name
| text
| not null
| extended |
|
display_name
| text
|
| extended |
|
twitch_oauth
| text
|
| extended |
|
is_sub
| boolean | not null default false | plain
|
|
is_mod
| boolean | not null default false | plain
|
|
autostatus
| boolean | not null default false | plain
|
|
patreon_user_id | integer |
| plain
|
|
Indexes:
"users_pkey" PRIMARY KEY, btree (id)
"users_patreon_user_key" UNIQUE CONSTRAINT, btree (patreon_user_id)
Foreign-key constraints:
"users_patreon_user_fkey" FOREIGN KEY (patreon_user_id) REFERENCES patreon_u
sers(id) ON UPDATE CASCADE ON DELETE SET NULL
Referenced by:
TABLE "game_votes" CONSTRAINT "game_votes_user_id_fkey" FOREIGN KEY (user_id
) REFERENCES users(id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "highlights" CONSTRAINT "highlights_user_fkey" FOREIGN KEY (user_id) R
EFERENCES users(id)
TABLE "history" CONSTRAINT "history_changeuser2_fkey" FOREIGN KEY (changeuse
r) REFERENCES users(id)
Index "public.users_patreon_user_key"
Column
| Type | Definition
| Storage
--------------+---------+-----------------+--------patreon_user | integer | patreon_user_id | plain
unique, btree, for table "public.users"
Index "public.users_pkey"
Column | Type | Definition | Storage
--------+---------+------------+--------id
| integer | id
| plain
primary key, btree, for table "public.users"

Вам также может понравиться