コンテンツにスキップ

public.user_app_settings

Description

Columns

Name Type Default Nullable Children Parents Comment
id bigint nextval('user_app_settings_id_seq'::regclass) false
user_id bigint false public.users
app_id bigint false public.apps
selected_workbook_id bigint true public.workbooks
created_at timestamp without time zone CURRENT_TIMESTAMP true
updated_at timestamp without time zone CURRENT_TIMESTAMP true

Constraints

Name Type Definition
user_app_settings_app_id_not_null n NOT NULL app_id
user_app_settings_id_not_null n NOT NULL id
user_app_settings_user_id_not_null n NOT NULL user_id
user_app_settings_selected_workbook_id_fkey FOREIGN KEY FOREIGN KEY (selected_workbook_id) REFERENCES workbooks(id) ON DELETE SET NULL
user_app_settings_user_id_fkey FOREIGN KEY FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
user_app_settings_app_id_fkey FOREIGN KEY FOREIGN KEY (app_id) REFERENCES apps(id) ON DELETE CASCADE
user_app_settings_pkey PRIMARY KEY PRIMARY KEY (id)
user_app_settings_user_id_app_id_key UNIQUE UNIQUE (user_id, app_id)

Indexes

Name Definition
user_app_settings_pkey CREATE UNIQUE INDEX user_app_settings_pkey ON public.user_app_settings USING btree (id)
user_app_settings_user_id_app_id_key CREATE UNIQUE INDEX user_app_settings_user_id_app_id_key ON public.user_app_settings USING btree (user_id, app_id)
idx_user_app_settings_user_id CREATE INDEX idx_user_app_settings_user_id ON public.user_app_settings USING btree (user_id)

Relations

er


Generated by tbls