Contains all past and current revisions of each page’s content.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| agent_call_id | uuid | true | public.agent_changeset_calls | For a change an agent made, the latest call that staged it before it was published; its client_name says which agent. Null for changes made in the web UI. | ||
| author_user_id | uuid | false | public.users | The id of the user that made the change. | ||
| content | jsonb | false | The unnormalized content of the page after the edit. | |||
| 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. | |||
| history_change_reason | history_change_reason | false | The reason the page’s content changed | |||
| id | uuid | uuid_generate_v4() | false | public.chatbot_page_sync_statuses public.course_page_markdown_content public.page_history public.page_history_spec_files | A unique, stable identifier for the record. | |
| page_id | uuid | false | public.pages | The page that this revision is of. | ||
| restored_from_id | uuid | true | public.page_history | If the page was restored from an earlier revision, contains the id of that revision. | ||
| title | varchar(255) | false | The title of the page after the edit. | |||
| 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. |
| Name | Definition |
|---|---|
| AI agent changesets | How a teacher’s AI agent edits course material through the MCP server without touching what students see. Every agent write is staged in the teacher’s open changeset for the course and reaches students only when the changeset is published; each call is logged with what it changed so that it can be reverted, and saves from the web UI and agents alike leave history. |
| Name | Type | Definition |
|---|---|---|
| page_history_agent_call_id_fkey | FOREIGN KEY | FOREIGN KEY (agent_call_id) REFERENCES agent_changeset_calls(id) |
| page_history_author_user_id_fkey | FOREIGN KEY | FOREIGN KEY (author_user_id) REFERENCES users(id) |
| page_history_author_user_id_not_null | n | NOT NULL author_user_id |
| page_history_content_not_null | n | NOT NULL content |
| page_history_created_at_not_null | n | NOT NULL created_at |
| page_history_history_change_reason_not_null | n | NOT NULL history_change_reason |
| page_history_id_not_null | n | NOT NULL id |
| page_history_page_id_fkey | FOREIGN KEY | FOREIGN KEY (page_id) REFERENCES pages(id) |
| page_history_page_id_not_null | n | NOT NULL page_id |
| page_history_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| page_history_restored_from_id_fkey | FOREIGN KEY | FOREIGN KEY (restored_from_id) REFERENCES page_history(id) |
| page_history_title_not_null | n | NOT NULL title |
| page_history_updated_at_not_null | n | NOT NULL updated_at |
| Name | Definition |
|---|---|
| page_history_page_id_created_at_id_idx | CREATE INDEX page_history_page_id_created_at_id_idx ON public.page_history USING btree (page_id, created_at DESC, id DESC) WHERE (deleted_at IS NULL) |
| page_history_pkey | CREATE UNIQUE INDEX page_history_pkey ON public.page_history USING btree (id) |
Generated by tbls