external_answer_items
Overview
Choices of imported questions (CS's answer_item).
Table Definition
| Logical name | Physical name | Column | Type | PK | Relation | Unique | Nullable | Default | Notes |
|---|---|---|---|---|---|---|---|---|---|
| External choice | external_answer_items | id | uuid | โฏ | gen_random_uuid() | ||||
| external_question_id | uuid | external_questions:id (cascade) | |||||||
| external_id | bigint | Choice ID on the CS side. Referenced by branch conditions | |||||||
| sentence | text | โฏ | Text of the choice | ||||||
| val | numeric | โฏ | Numeric value assigned to the choice | ||||||
| order_index | integer | โฏ | Position within the question | ||||||
| raw | jsonb | Raw JSON of the choice object |
Relations
- external_question_id โ external_questions.id (onDelete: cascade)
Indexes
- Primary key (id)
- UNIQUE INDEX: external_answer_items_question_external_id_idx (external_question_id, external_id)
Meaning per Question Type
In CS, what an answer_item means depends on the question format.
| CS question format | Meaning of answer_item |
|---|---|
| Selection (SA / MA) | A choice |
| Text matrix | A row (columns live in external_sub_items) |
| Text input (FA) | An input field (several fields within one question are expressed natively) |
| Pulldown | A choice, though branch conditions share the first one and judge by the text value |
Notes
- Negative
external_id: in FA branch conditions,answer_item_idcan be negative.-1means "any answer" and-2means "all answers" (neither points at a real choice) - Real CS traffic shows
nameandsentenceholding the same value; this table usessentence rawalso retains fields such asis_shuffle/fix_last/is_pinned(choice randomization) andplaceholder(FA fields and pulldown choices)