Changes between Initial Version and Version 1 of Ticket #2321


Ignore:
Timestamp:
May 15, 2024, 8:58:51 AM (6 months ago)
Author:
Nicklas Nordborg
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2321 – Description

    initial v1  
    4040
    4141
     42== Annotations ==
     43Annotations can be moved to the new derived bioassay by updating the !AnnotationSets table with the new id.
     44
     45|| **!AnnotationSets** || **Comment** ||
     46|| id                  || Keep ||
     47|| version             || Keep ||
     48|| item_type           || Change 264 (=RAWBIOASSAY) to 268 (=DERIVEDBIOASSAY) ||
     49|| item_id             || Change to new id ||
     50
     51NOTE! Cached annotations (in the `static.cache/snapshots-v5` directory) must be deleted. The simplest thing is to delete the entire directory and everything in it.
     52
     53NOTE! Annotation types that are enabled for raw bioassays but not derived bioassays need to be updated. We can either let the admin handle that manually or it might be possible to implement this in the tool as well. We would need to insert an entry into the !AnnotationTypeItems table for each annotation type:
     54
     55|| **!AnnotationTypeItems** || **Comment** ||
     56|| annotationtype_id        || Id of annotation type ||
     57|| item_type                || 268 ||
    4258
    4359
     60== Files ==
     61Files can be moved to the new derived bioassay by updating the !FileSets table with the new id.
     62
     63|| **!FileSets** || **Comment** ||
     64|| id            || Keep ||
     65|| version       || Keep ||
     66|| item_type     || Change 264 (=RAWBIOASSAY) to 268 (=DERIVEDBIOASSAY) ||
     67
     68== Any-to-any links ==
     69Links are moved to the new derived bioassay by updating the !AnyToAny table. We need to check both the source and target of the links.
     70
     71|| **!AnyToAny** || **Comment** ||
     72|| id            || Keep ||
     73|| version       || Keep ||
     74|| name          || Keep ||
     75|| description   || Keep ||
     76|| from_id       || Keep or change to new id ||
     77|| from_type     || Change 264 (=RAWBIOASSAY) to 268 (=DERIVEDBIOASSAY) ||
     78|| to_id         || Keep or change to new id ||
     79|| to_type       || Change 264 (=RAWBIOASSAY) to 268 (=DERIVEDBIOASSAY) ||
     80|| uses_to       || Keep ||
     81
     82== Change history ==
     83The change history is moved to the new derived bioassay by updating the !ChangeHistoryDetails table. This will leave the old raw bioassay without a change history. I think we should insert a new entry representing the migration. We should also insert a new entry for the derived bioassay.
     84
     85|| **!ChangeHistoryDetails** || **Comment** ||
     86|| id                        || Keep ||
     87|| version                   || Keep ||
     88|| history_id                || Keep ||
     89|| change_type               || Keep ||
     90|| item_id                   || Change to new id ||
     91|| item_type                 || Change 264 (=RAWBIOASSAY) to 268 (=DERIVEDBIOASSAY) ||
     92|| change_info               || Keep ||
     93|| old_value                 || Keep ||
     94|| new_value                 || Keep ||
     95
     96A new entry in the !ChangeHistory table is created that represents the migration:
     97|| **!ChangeHistory** || **Comment** ||
     98|| id                 || Generated ||
     99|| version            || 0 ||
     100|| time               || Current timestamp ||
     101|| user_id            || Id of root user ||
     102|| session_id         || Id of current session ||
     103|| client_id          || Id of a new client (net.sf.basedb.clients.rba2dba-migration)||
     104|| project_id         || Null ||
     105|| plugin_id          || Null ||
     106|| job_id             || Null ||
     107|| name               || Migrate raw bioassays to derived bioassays ||
     108
     109New entries for the raw bioassay and the new derived bioassay in the !ChangeHistoryDetails table:
     110|| **!ChangeHistoryDetails** || **Comment** ||
     111|| id                        || Generated ||
     112|| version                   || 0 ||
     113|| history_id                || Id of current history ||
     114|| change_type               || 8 (A new type is defined) ||
     115|| item_id                   || Id of raw bioassay or derived bioassay ||
     116|| item_type                 || 264 (=RAWBIOASSAY) or 268 (=DERIVEDBIOASSAY) ||
     117|| change_info               || Migrated <name-of-rba> from raw bioassay to derived bioassay ||
     118|| old_value                 || Null ||
     119|| new_value                 || Null ||
     120
     121
     122