Index

public.external_courses

Description

External courses are other mooc-courses not on courses.mooc.fi

Columns

Name Type Default Nullable Children Parents Comment
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.
description text true The description of a course summarizes what the course teaches and what you have to do in it.
description_embedding vector(1536) true Embedding vector of the course description, used for semantic searching.
id uuid uuid_generate_v4() false A unique, stable identifier for the record.
name varchar(255) false Human readable name of the course.
name_embedding vector(1536) true Embedding vector of the course name, used for semantic searching.
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.
url varchar(255) false The URL address to the external platform where to course is hosted.

Constraints

Name Type Definition
external_courses_created_at_not_null n NOT NULL created_at
external_courses_id_not_null n NOT NULL id
external_courses_name_not_null n NOT NULL name
external_courses_pkey PRIMARY KEY PRIMARY KEY (id)
external_courses_updated_at_not_null n NOT NULL updated_at
external_courses_url_not_null n NOT NULL url

Indexes

Name Definition
external_courses_description_embedding_idx CREATE INDEX external_courses_description_embedding_idx ON public.external_courses USING hnsw (description_embedding vector_ip_ops) WHERE (deleted_at IS NULL)
external_courses_name_embedding_idx CREATE INDEX external_courses_name_embedding_idx ON public.external_courses USING hnsw (name_embedding vector_ip_ops) WHERE (deleted_at IS NULL)
external_courses_pkey CREATE UNIQUE INDEX external_courses_pkey ON public.external_courses USING btree (id)

Triggers

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

Relations

er

Generated by tbls