Index

public.user_ai_usage_notice_acknowledgements

Description

Records that a user has read and agreed to the AI-usage / academic-integrity notice for a course language group. One acknowledgement per user per course language group, so accepting the notice on one language version covers all language versions.

Columns

Name Type Default Nullable Children Parents Comment
course_language_group_id uuid false public.course_language_groups The course language group the acknowledgement applies to. Shared across all language versions of the course.
created_at timestamp with time zone now() false Timestamp 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.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
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 The user who acknowledged the notice.

Constraints

Name Type Definition
user_ai_usage_notice_acknowle_course_language_group_id_not_null n NOT NULL course_language_group_id
user_ai_usage_notice_acknowledgem_course_language_group_id_fkey FOREIGN KEY FOREIGN KEY (course_language_group_id) REFERENCES course_language_groups(id)
user_ai_usage_notice_acknowledgements_created_at_not_null n NOT NULL created_at
user_ai_usage_notice_acknowledgements_id_not_null n NOT NULL id
user_ai_usage_notice_acknowledgements_pkey PRIMARY KEY PRIMARY KEY (id)
user_ai_usage_notice_acknowledgements_updated_at_not_null n NOT NULL updated_at
user_ai_usage_notice_acknowledgements_user_id_fkey FOREIGN KEY FOREIGN KEY (user_id) REFERENCES users(id)
user_ai_usage_notice_acknowledgements_user_id_not_null n NOT NULL user_id

Indexes

Name Definition
user_ai_usage_notice_ack_user_clg_uniqueness CREATE UNIQUE INDEX user_ai_usage_notice_ack_user_clg_uniqueness ON public.user_ai_usage_notice_acknowledgements USING btree (user_id, course_language_group_id) WHERE (deleted_at IS NULL)
user_ai_usage_notice_acknowledgements_pkey CREATE UNIQUE INDEX user_ai_usage_notice_acknowledgements_pkey ON public.user_ai_usage_notice_acknowledgements USING btree (id)

Triggers

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

Relations

er

Generated by tbls