Index

public.course_designer_plans

Description

A collaborative plan used to design a MOOC course over multiple months.

Columns

Name Type Default Nullable Children Parents Comment
active_stage course_designer_stage true Stage currently active in the UI. This is manually transitioned by the user.
created_at timestamp with time zone now() false Timestamp when the record was created.
created_by_user_id uuid false public.users User who created the plan.
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 public.course_designer_plan_events public.course_designer_plan_members public.course_designer_plan_stages A unique, stable identifier for the record.
last_weekly_stage_email_sent_at timestamp with time zone true Timestamp when the latest weekly stage reminder email was sent to plan members.
name varchar(255) true Optional user-provided name for the plan.
status course_designer_plan_status ‘draft’::course_designer_plan_status false Overall workflow status of the plan.
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.

Constraints

Name Type Definition
course_designer_plans_check CHECK CHECK (((status <> ‘in_progress’::course_designer_plan_status) OR (active_stage IS NOT NULL)))
course_designer_plans_created_at_not_null n NOT NULL created_at
course_designer_plans_created_by_user_id_fkey FOREIGN KEY FOREIGN KEY (created_by_user_id) REFERENCES users(id)
course_designer_plans_created_by_user_id_not_null n NOT NULL created_by_user_id
course_designer_plans_id_not_null n NOT NULL id
course_designer_plans_name_check CHECK CHECK (((name IS NULL) OR (TRIM(BOTH FROM name) <> ’’::text)))
course_designer_plans_pkey PRIMARY KEY PRIMARY KEY (id)
course_designer_plans_status_not_null n NOT NULL status
course_designer_plans_updated_at_not_null n NOT NULL updated_at

Indexes

Name Definition
course_designer_plans_pkey CREATE UNIQUE INDEX course_designer_plans_pkey ON public.course_designer_plans USING btree (id)

Triggers

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

Relations

er

Generated by tbls