Canonical data schema for the same entity in every source
Use this page as the single canonical schema for field names, types, nullability, enum values, and date formats. Where another guide, form, screen, or query states a different name or format for the same field, this page governs and that page is read as corrected to this page. No record is deleted to resolve a mismatch. A legacy value is kept beside its canonical value until a person confirms the canonical value.
How to read this schema
Each table states the canonical name first. Type uses string, integer, boolean, date, datetime, or enum. Nullability uses required, optional, or nullable. A missing value is null on the wire, never an empty string and never zero, except for a count which is the number 0. Dates use date as YYYY-MM-DD. Times use datetime as ISO 8601 in UTC with Z. College local time is a label beside a UTC value, never a replacement for it.
- Validate in this order for every record: unknown field check, type check with no coercion from number, object, array, or boolean to string, trim check, length check on the trimmed value, control character check, enum check exact and case sensitive, date format check, then tenant and owner check.
- A wrong type is a structured 400 with fields on a mutating route, as stated in Request validation. It is never a 500 and never a coerced value.
- Keep the legacy value in a legacy field or in display text when a canonical value is derived from it. The legacy value is removed only after a person confirms the canonical value on screen.
- System view still shows counts grouped by tenant_id only. This schema adds no cross college read and no new permission.
Mismatch inventory across sources in this pack
Each row names the same entity, the surfaces that state it differently, and the mismatch to resolve.
| Entity | Surfaces in this pack | Mismatch |
|---|---|---|
| Public request org | Request a demo form as College or system office, form field standard inventory as org with limit 200, configuration manifest as college | One field with two names, org and college, and one label with three wordings |
| Public request role | Request a demo inline validator with 7 values, site script and source review form with 9 Title Case values, set retention and access with 8 lower case canonical values, workspace member audit with task roles added | Enum size 7 against 9, Title Case against lower case, Other present in one set, and builder, approver, source owner, assistant owner mixed with sign in roles |
| Public request page | Form field standard as any path starting with slash with no allowlist and no length, request validation as an allowlisted public page path or other | Allowlist present in one page and absent in the other, and no stated length in either page |
| Public request website | Form field standard as a payload field sent by the script, both validators as a field skipped as a honeypot | Sent in the payload in one description and skipped in the other, with no stated empty rule in the manifest |
| Saved answer workspace | My Answers and My Library as workspace name 120 characters, follow record and dashboard SQL as tenant_id as an identifier | A display name is used where a stable identifier is required for tenant scoping |
| Saved answer last checked | My Library as lastChecked 80 characters, share answer as last checked date with placeholder As shown on the answer, save answer bundle with the same 80 limit | One field holds free display text, a date, and a placeholder sentence with no stated date format |
| Saved answer saved date | Share answer as savedDate YYYY-MM-DD 10 characters, My Answers as createdAt as a time in UTC | Date only against datetime for the same save moment |
| Saved answer collection | My Answers as collectionId, My Library as folder name 80 characters, guides index panel as topic | Identifier against display name against a topic word for the same grouping |
| Follow week | Follow a question digest table as Week starting Monday UTC, follow spec and reports as Monday in college local time | One week bucket with two time bases and no label on the digest table |
| Notification summary type | Notification audit and consolidation as weekly usage summary and as scheduled report summary, read reports as scheduled report summary | Two names for one trigger with one cadence rule |
| Question citation flag | Dashboard SQL as has_citation equals 1, status convention and guide tables as boolean true or false | Integer flag against boolean for the same answered test |
| Source review date | Approve a source and get started as a future review date with no format, reports as review date with no format | No stated format, so a datetime and a date can be stored in the same field |
Canonical schema by entity
Use these tables when a screen, a form, or a query names a field. A field not listed here does not exist in this pack and must not be claimed on a page.
| Canonical field | Type, nullability, enum or format | Validation rule |
|---|---|---|
| name | string, required | 1 to 120 chars after trim, single line, no control chars. Number, object, array, boolean is a 400, never coerced. |
| string, required | 1 to 254 chars after trim, single line, no control chars, one at sign and a dot in the domain. Stored as given, never lowercased on the wire. | |
| org | string, required. Legacy alias college | 1 to 200 chars after trim, single line, no control chars. College or system office name only. It is not a workspace id and grants no access. |
| role | string, required, enum, exact Title Case on the wire | One of College administrator, System office governance staff, IT staff, Faculty, Student services staff, Help desk staff, Student, Prospective student, Other. Any other value, including a lower case value, is a 400 for role. |
| message | string, required | 1 to 4000 chars after trim. Line breaks, tab, and carriage return allowed. Other control chars are a 400. |
| kind | string, required, enum | demo or question only, exact and case sensitive. |
| page | string, required | Allowlisted public page path with query and hash stripped, or other. Max 500 chars after trim. Never a full URL, never a workspace id. One allowlist is published in the operations table in the same change that ships it. |
| website | string, optional, honeypot | Must be empty for a person. Max 500 chars. A non-empty value is treated as a bot and is not sent as a request. |
| X-Request-Id header | string, required | Generated once per payload, reused on retry with the same field values, new value when field values change. Header only, never a body field. |
| Unknown fields | rejected | Any body key outside name, email, org, role, message, kind, page, website is a 400 naming that field, including tenant_id, workspace_id, workspace, assistant_id, and any id field. |
| Canonical field | Type, nullability, enum or format | Validation rule |
|---|---|---|
| id | string, required | Stable identifier, passed back unchanged, no arithmetic on it. |
| title | string, required | 1 to 200 chars after trim. One label wording Answer title on every form. |
| question | string, optional | 0 to 2000 chars. Re-ask copies question, or title when question is null. |
| answer | string, optional | 0 to 4000 chars. No added fact beyond the stored answer. |
| source_title | string, nullable | 0 to 200 chars when present. Null for a not-known record, never an empty string. |
| source_link | string, nullable | 0 to 500 chars when present, starts with https. Null for a not-known record. |
| last_checked_date | date, nullable | YYYY-MM-DD when a real date is stored. Null when only display text is stored. |
| last_checked_display | string, nullable | 0 to 80 chars. Holds legacy text such as As shown on the answer. Shown beside last_checked_date, never parsed as a date. |
| workspace_id | string, nullable | Stable college workspace identifier. Null only on a device record with no workspace. Never a workspace name. |
| workspace_label | string, nullable | 0 to 120 chars. College name as shown at the top of the app. Legacy workspace field maps here. |
| assistant_id | string, nullable | Stable assistant identifier. Null only on a device record with no assistant. |
| assistant_label | string, nullable | 0 to 120 chars. Assistant name as shown in the app. Legacy assistant field maps here. |
| collection_id | string, optional | Identifier of one collection. Unfiled is the default identifier. Folder name and topic are display values only and never replace this identifier. |
| created_at, updated_at, last_opened_at | datetime, nullable for last_opened_at | ISO 8601 in UTC with Z. Saved date in a share is saved_date as a date derived from created_at, never a second stored time. |
| reask_count | integer, required | 0 or more. Counts re-ask actions only. |
| tags, pinned | array of string, boolean | At most 5 tags, each 1 to 24 chars, deduplicated by lower case. Pinned is true or false. Stored in campus-answers:my-library:v1, answers in campus-answers:my-answers:v1. |
| Canonical field | Type, nullability, enum or format | Validation rule |
|---|---|---|
| follow_id, tenant_id, question_id, follower_user_id | string, required | One follow per follower per question. Tenant_id is the college workspace identifier, never a workspace name. |
| follow_state | enum, required | active or off only. Unfollow sets off at once. Off records stay for audit and are excluded from counts. |
| last_change_type | enum, required | none, staff_reply, handoff_reply, checked_label only. |
| digest_cadence, paused | enum, boolean | Cadence off or weekly, weekly only for this type. Paused true or false from the global pause. Pause wins and sends no catch-up. |
| week_start_local_date | date, required for a digest line | YYYY-MM-DD for Monday in college local time. Week_start_utc_date is a separate date field for a public demo bucket and is never mixed with it in one count. |
| source status | enum, required | in_review, approved, suspended, expired, retired only. Only approved is cited in a new answer. |
| review_date, last_checked_date on a source | date, required | YYYY-MM-DD, a future date at submit time for review_date. A datetime is a 400, not truncated silently. |
| question outcome | enum, required | answered, not_answered, handed_off, unavailable only. Unavailable is separate from not_answered and is never a source gap. |
| has_citation | boolean, required | true or false on the wire. SQL may store 1 or 0 only behind a boolean view, and a query must not return 1 or 0 to a client. |
| rating | enum, nullable | helpful, not_helpful, or null for unrated. Unrated stays out of the helpful rate denominator. |
| role storage value | enum, required | college_administrator, system_office_governance_staff, it_staff, faculty, student_services_staff, help_desk_staff, student, prospective_student, other. Display uses Title Case from the public request table. Builder, approver, source_owner, assistant_owner are task assignments, never sign in roles, and never merge into this enum. |
| notification type | enum, required | source_review_due, approval_decision, handoff_assigned, unanswered_theme_assigned, assistant_paused_or_retired, scheduled_report_summary only. Weekly usage summary is a display label for scheduled_report_summary and is never a second type. |
Migration mapping without losing records
Apply each mapping on read and on write in the same release. Keep the legacy value until the canonical value is confirmed.
| Legacy | Canonical | Transform and record kept |
|---|---|---|
| college in the configuration manifest | org | Read college as an alias for org. Write org only. Keep the manifest entry until config code ships org, then update the manifest in the same change. |
| 7 role values, 9 Title Case values, 8 lower case values | role on the wire in Title Case, role storage in lower snake case | Map each Title Case value to its storage value by the table above. A 7 value record keeps its value and maps by exact text. No role is widened to a role it did not hold. |
| workspace name | workspace_label, plus workspace_id when known | Copy the name to workspace_label. Set workspace_id from the session tenant only, never by parsing a name. A record with no identifier keeps workspace_id null. |
| lastChecked free text | last_checked_display, plus last_checked_date when parseable as YYYY-MM-DD | Copy the full text to last_checked_display. Set last_checked_date only when the text is exactly a valid date. As shown on the answer stays display only and is never shown as a date. |
| savedDate YYYY-MM-DD in a share | saved_date derived from created_at | Derive saved_date from created_at in college local time for display. Keep created_at as the stored datetime. A share with only saved_date keeps that date and sets created_at to that date at 00:00 UTC with a legacy flag. |
| folder name, topic | collection_id, plus collection_label | Resolve the name to the existing collection identifier once. Keep the name as collection_label. A topic with no matching collection stays as a tag, never as a collection. |
| Week starting Monday UTC on a digest | week_start_local_date, plus week_start_utc_date on a public demo | Keep the stored UTC date in week_start_utc_date. Compute week_start_local_date from the change time in college local time. Never relabel a UTC bucket as a local bucket. |
| has_citation 1 or 0 | has_citation boolean | Map 1 to true and 0 to false at the database boundary. Return boolean only. Keep the stored integer until the column type is confirmed in migrations. |
| weekly usage summary | scheduled_report_summary | Map the label to the one enum value. Keep one cadence per recipient, weekly or monthly, never both. No second schedule is created. |
| Unknown field on a device record | Preserved as stored | A device record keeps unknown fields on read and on export. A mutating server route rejects an unknown field by name. No device record is dropped for an unknown field. |
Checks before you ship a schema change
Run each check in a test college workspace and on a device with saved items. If a check fails, fix it before publish.
- Send each public request field with a wrong type, an empty value, an over limit value, and an out of enum value, and confirm a structured 400 with that field in fields and no save or send.
- Send an unknown field and a workspace identifier in the body of a public route, and confirm a 400 naming that field and no workspace access.
- Open a saved item with legacy free text last checked text and confirm last_checked_display shows the full text and last_checked_date stays null, with no date invented.
- Open a saved item with a workspace name and confirm workspace_label shows the name and workspace_id stays null until the session tenant is known.
- Confirm a week bucket states its basis, Monday college local time in the signed in app or Monday UTC on a public demo, and the two bases never mix in one count.
- Confirm role display in Title Case and role storage in lower snake case round trip for all 9 public values, and that builder and approver never appear as sign in roles.
- Confirm test and staff preview sessions are excluded from every count and labeled as excluded, and unavailable stays separate from not answered.
Follow Request validation for the 400 shape, Form field standard for label, helper, and error placement, API payload performance for field selection, and List pagination, sorting, and filtering for total counts.
Next guide
Keep validation in step with the form fields on Request a demo.