Skip to content

dartbrief.watch_stocks

Columns

NameTypeDefaultNullableChildrenParentsComment
corp_codevarchar(8)false
corp_namevarchar(255)false
created_attimestamp(6) without time zonenow()false
idbigintnextval('watch_stocks_id_seq'::regclass)false
notify_enabledbooleantruefalse
stock_codevarchar(6)true
user_idbigintfalsedartbrief.users

Constraints

NameTypeDefinition
watch_stocks_pkeyPRIMARY KEYPRIMARY KEY (id)
watch_stocks_user_id_corp_code_keyUNIQUEUNIQUE (user_id, corp_code)
watch_stocks_user_id_fkeyFOREIGN KEYFOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE

Indexes

NameDefinition
idx_watch_stocks_corp_codeCREATE INDEX idx_watch_stocks_corp_code ON dartbrief.watch_stocks USING btree (corp_code)
idx_watch_stocks_user_idCREATE INDEX idx_watch_stocks_user_id ON dartbrief.watch_stocks USING btree (user_id)
watch_stocks_pkeyCREATE UNIQUE INDEX watch_stocks_pkey ON dartbrief.watch_stocks USING btree (id)
watch_stocks_user_id_corp_code_keyCREATE UNIQUE INDEX watch_stocks_user_id_corp_code_key ON dartbrief.watch_stocks USING btree (user_id, corp_code)

Relations

mermaid
erDiagram

"dartbrief.watch_stocks" }o--|| "dartbrief.users" : ""

"dartbrief.watch_stocks" {
  bigint user_id FK
}
"dartbrief.users" {
  bigint id
}

Generated by tbls