items_items


Description

Parent-child (N-N) relationship between items (acyclic graph)

Columns

Column Type Size Nulls Auto Default Children Parents Comments
parent_item_id BIGINT 19 null
items.id fk_items_items_parent_item_id_items_id R
child_item_id BIGINT 19 null
items.id fk_items_items_child_item_id_items_id C
child_order INT 10 null

Position, relative to its siblings, when displaying all the children of the parent. If multiple items have the same child_order, they will be sorted in a random way, specific to each user (a user will always see the items in the same order).

category enum('Undefined', 'Discovery', 'Application', 'Validation', 'Challenge') 11 Undefined

Tag that indicates the role of this item, from the point of view of the parent item's validation criteria. Also gives indication to the user of the role of the item.

score_weight TINYINT UNSIGNED 3 1

Weight of this child in his parent's score computation

content_view_propagation enum('none', 'as_info', 'as_content') 10 none

Defines how a can_view=”content” permission propagates

upper_view_levels_propagation enum('use_content_view_propagation', 'as_content_with_descendants', 'as_is') 28 use_content_view_propagation

Defines how can_view="content_with_descendants"|"solution" permissions propagate

grant_view_propagation BIT 1 0

Whether can_grant_view propagates (as the same value, with “solution” as the upper limit)

watch_propagation BIT 1 0

Whether can_watch propagates (as the same value, with “answer” as the upper limit)

edit_propagation BIT 1 0

Whether can_edit propagates (as the same value, with “all” as the upper limit)

request_help_propagation TINYINT 3 0

Whether can_request_help_to propagates

content_view_propagation_value TINYINT UNSIGNED 3 null

content_view_propagation as an integer (to use comparison operators)

upper_view_levels_propagation_value TINYINT UNSIGNED 3 null

upper_view_levels_propagation as an integer (to use comparison operators)

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc/Asc parent_item_id + child_item_id
child_item_id Performance Asc child_item_id
parent_item_id Performance Asc parent_item_id

Relationships