Serial Units won't go into Copy Buckets

Bug #1152753 reported by Mike Rylander on 2013-03-08
This bug affects 5 people
Affects Status Importance Assigned to Milestone

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 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) on 2013-03-17
Changed in evergreen:
status: New → Triaged
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) on 2013-08-22
no longer affects: evergreen/2.2
Ben Shum (bshum) on 2013-08-22
Changed in evergreen:
assignee: nobody → Ben Shum (bshum)

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) on 2016-01-05
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 →
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.0-alpha
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  Edit
Everyone can see this information.

Other bug subscribers