LP#1786100: fix upgrade issue that can prevent unmapping item tags user/gmcharlt/lp1786100_fix_actcm_inh_fkey
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 23 Sep 2020 15:48:58 +0000 (11:48 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 23 Sep 2020 15:56:26 +0000 (11:56 -0400)
commit0f52a07ce3f87ce8414bd9064e23c667d0dcab92
tree86f859122d8985cb92d75dbf741c4a74b0bb86cd
parent5a12f351487c8f616914043ce8450c2d2e2d1229
LP#1786100: fix upgrade issue that can prevent unmapping item tags

Depending on the history of an Evergreen database, it might have an
incorrect trigger on asset.copy_tag_copy_map that prevents removing
item tags fom items. This patch ensures that the table has the
correct trigger.

To test (cannot remove item tags)
---------------------------------
[1] If you have a database from which item tags cannot be removed
    on items, check the asset.copy_tag_copy_map table to see if
    it has a trigger named inherit_copy_tag_copy_map_copy_fkey that
    fires on insert, update, or delete. If so, this part of the
    test plan applies to you.
[2] Make a copy of the database.
[3] Note that item tags cannot be unassigned from items in the
    holdings editor: saving a change will appear to stick, but
    opening the item back in the editor shows that the item tag
    is still there.
[4] Apply the patch and run the schema update. Note that there be
    just one inh_fkey trigger named inherit_asset_copy_tag_copy_map_copy_fkey
    that fires only on insert or update.
[5] Repeate step 3; this time, items tags can be removed
    from items.

To test (can remove item tags)
------------------------------
[1] If your test system _can_ remove item tags, as would be
    the case with ones created from scratch, apply the patch
    and verify that item tags can be added or removed from
    items.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.fix_actcm_inh_fkey_trigger.sql [new file with mode: 0644]