Custom Fields (EAV)
Admin-configurable custom metadata fields using Entity-Attribute-Value pattern.
ahgCustomFieldsPlugin
0
custom_field_definition0
custom_field_valueEntity Relationship Diagram
Open Full SizeForeign Key Relationships
| Constraint | Table | Column | References | Referenced Column | |
|---|---|---|---|---|---|
custom_field_value_ibfk_1 |
custom_field_value |
field_definition_id | custom_field_definition |
id |
custom_field_definition
19 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
bigint unsigned | NOT NULL | - | auto_increment | |
| FK | field_key |
varchar(100) | NOT NULL | - | ||
field_label |
varchar(255) | NOT NULL | - | |||
field_type |
varchar(30) | NOT NULL |
text
|
text, textarea, date, number, boolean, dropdown, url | ||
| FK | entity_type |
varchar(50) | NOT NULL | - | informationobject, actor, accession, repository, donor, function | |
| FK | field_group |
varchar(100) | NULL | - | UI section grouping label | |
dropdown_taxonomy |
varchar(100) | NULL | - | ahg_dropdown taxonomy key when field_type=dropdown | ||
is_required |
tinyint(1) | NULL |
0
|
|||
is_searchable |
tinyint(1) | NULL |
0
|
|||
is_visible_public |
tinyint(1) | NULL |
1
|
|||
is_visible_edit |
tinyint(1) | NULL |
1
|
|||
is_repeatable |
tinyint(1) | NULL |
0
|
|||
default_value |
varchar(500) | NULL | - | |||
help_text |
varchar(500) | NULL | - | |||
validation_rule |
varchar(255) | NULL | - | e.g. max:255, regex:/^[A-Z]/ | ||
sort_order |
int | NULL |
0
|
|||
| FK | is_active |
tinyint(1) | NULL |
1
|
||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
custom_field_value
11 columns
0 rows
| Column | Type | Nullable | Default | Extra | Comment | |
|---|---|---|---|---|---|---|
| PK | id |
bigint unsigned | NOT NULL | - | auto_increment | |
| FK | field_definition_id |
bigint unsigned | NOT NULL | - | ||
| FK | object_id |
int | NOT NULL | - | FK to the entity (information_object.id, actor.id, etc.) | |
value_text |
text | NULL | - | |||
value_number |
decimal(15,4) | NULL | - | |||
value_date |
date | NULL | - | |||
value_boolean |
tinyint(1) | NULL | - | |||
| FK | value_dropdown |
varchar(100) | NULL | - | ahg_dropdown code reference | |
sequence |
int | NULL |
0
|
Ordering for repeatable fields | ||
created_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED | ||
updated_at |
datetime | NULL |
CURRENT_TIMESTAMP
|
DEFAULT_GENERATED on update CURRENT_TIMESTAMP |
Notes
Log in to add notes.
Legend
PK Primary Key
FK Foreign Key / Index
UQ Unique Constraint
Table structures are read live from the database. Row counts reflect current data.