Index

public.user_passwords

Description

This table is used to keep a record of the users password

Columns

Name Type Default Nullable Children Parents Comment
created_at timestamp with time zone now() false Timestamp of when the record was created.
deleted_at timestamp with time zone true Timestamp when the record was deleted. If null, the record is not deleted.
password_hash text false Hashed password of the user
updated_at timestamp with time zone now() false Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger.
user_id uuid false public.users References the unique identifier of the user.

Constraints

Name Type Definition
user_passwords_created_at_not_null n NOT NULL created_at
user_passwords_password_hash_not_null n NOT NULL password_hash
user_passwords_pkey PRIMARY KEY PRIMARY KEY (user_id)
user_passwords_updated_at_not_null n NOT NULL updated_at
user_passwords_user_id_fkey FOREIGN KEY FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
user_passwords_user_id_not_null n NOT NULL user_id

Indexes

Name Definition
user_passwords_pkey CREATE UNIQUE INDEX user_passwords_pkey ON public.user_passwords USING btree (user_id)

Triggers

Name Definition
set_timestamp CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.user_passwords FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp()

Relations

er

Generated by tbls