コンテンツにスキップ

public.accounts

Description

Columns

Name Type Default Nullable Children Parents Comment
id bigint nextval('accounts_id_seq'::regclass) false public.users
cognito_sub varchar(255) false
email varchar(255) true
primary_user_id bigint false public.users
created_at timestamp with time zone CURRENT_TIMESTAMP false
updated_at timestamp with time zone CURRENT_TIMESTAMP false

Constraints

Name Type Definition
accounts_cognito_sub_not_null n NOT NULL cognito_sub
accounts_created_at_not_null n NOT NULL created_at
accounts_id_not_null n NOT NULL id
accounts_primary_user_id_not_null n NOT NULL primary_user_id
accounts_updated_at_not_null n NOT NULL updated_at
accounts_primary_user_id_fkey FOREIGN KEY FOREIGN KEY (primary_user_id) REFERENCES users(id) ON DELETE RESTRICT
accounts_pkey PRIMARY KEY PRIMARY KEY (id)
accounts_cognito_sub_key UNIQUE UNIQUE (cognito_sub)

Indexes

Name Definition
accounts_pkey CREATE UNIQUE INDEX accounts_pkey ON public.accounts USING btree (id)
accounts_cognito_sub_key CREATE UNIQUE INDEX accounts_cognito_sub_key ON public.accounts USING btree (cognito_sub)
idx_accounts_primary_user_id CREATE UNIQUE INDEX idx_accounts_primary_user_id ON public.accounts USING btree (primary_user_id)

Relations

er


Generated by tbls