Leave a comment at the end of this page or email contact@krishagni.com
Fixing transfer events table
Prior to v4x, all specimen event forms shipped with OpenSpecimen were "app" managed in that their tables were created by app and DE was responsible for managing only metadata. Therefore whenever a new field was added to the event form, a change set was required in OpenSpecimen to explicitly add column to the event table. However this got changed in v4x which allowed DE to manage all non-system specimen event form tables as well. As a result, when someone upgrades from a older version to 4x later versions, they will find an attempt being made to add same column twice - first by OS by change sets in releases prior to v4x and secondly by DE resulting in duplicate column error. To fix this problem, follow below steps:
Rename duplicate columns. This will allow DE to create metadata and add new table columns.
alter table catissue_transfer_event_param rename column from_position to from_position_bk; alter table catissue_transfer_event_param rename column to_position to to_position_bk;
Restart OpenSpecimen.
After successful restart, as a final step, execute following DML to restore the original column values
update catissue_transfer_event_param set from_position = from_position_bk; update catissue_transfer_event_param set to_position = to_position_bk; commit;
Leave a comment at the end of this page or email contact@krishagni.com