Serial Units won't go into Copy Buckets

Bug #1152753 reported by Mike Rylander
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned

Bug Description

While serial.unit is a child table of asset.copy, container.copy_bucket_item requires its target_copy column satisfy an FKEY constraint to asset.copy.id. So, trying to add a unit-cum-copy to a copy bucket results in an ugly error.

We can remove this constraint, but there is a CASCADE ON DELETE clause on the constraint that we'd lose.

Thoughts, other than ripping out serial.unit?

Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
Revision history for this message
Ben Shum (bshum) wrote :

Marking confirmed and stating that Mike's idea in IRC to drop the constraint worked for us to allow serial units to be added to copy buckets.

Something like:

ALTER TABLE container.copy_bucket_item DROP CONSTRAINT copy_bucket_item_target_copy_fkey;

Changed in evergreen:
status: Triaged → Confirmed
importance: Undecided → Medium
Ben Shum (bshum)
no longer affects: evergreen/2.2
Ben Shum (bshum)
Changed in evergreen:
assignee: nobody → Ben Shum (bshum)
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

If somebody can readily clarify for me, you'll save me the trouble of a test. With our triggers that just set deleted = true for copies instead of actually allowing them to be deleted for the most part, will that cascade on delete ever really be invoked? If not, then I suppose it's worth it to remove the FK constraint in this case.

Ben Shum (bshum)
Changed in evergreen:
assignee: Ben Shum (bshum) → nobody
no longer affects: evergreen/2.3
no longer affects: evergreen/2.4
Changed in evergreen:
milestone: none → 2.next
Revision history for this message
Galen Charlton (gmc) wrote :

A patch for this is include in the overall branch for the web staff client's serial module; please see bug 1708291.

Changed in evergreen:
milestone: 3.next → 3.0-alpha
Revision history for this message
Mike Rylander (mrylander) wrote :
Changed in evergreen:
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.