accession_state_history

0 rows


Description

Historical record of when accessions moved to different states. A row is inserted here for every state transition.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
accession_id int8 19 null
accessions.id accession_state_history_accession_id_fkeyC
updated_time timestamptz 35,6 null
old_state_id int4 10 null
accession_states.id accession_state_history_old_state_id_fkeyR

Null if this is the initial state for a new accession.

new_state_id int4 10 null
accession_states.id accession_state_history_new_state_id_fkeyR
reason text 2147483647 null
updated_by int8 19 null
users.id accession_state_history_updated_by_fkeyR

Indexes

Constraint Name Type Sort Column(s)
accession_state_history_accession_id_idx Performance Asc accession_id
accession_state_history_new_state_id_updated_time_idx Performance Asc/Asc new_state_id + updated_time

Relationships