CREATE TRIGGER norm_sort_label BEFORE INSERT OR UPDATE ON biblio.monograph_part FOR EACH ROW EXECUTE PROCEDURE biblio.normalize_biblio_monograph_part_sortkey();
+CREATE TABLE asset.copy_part_map (
+ id SERIAL PRIMARY KEY,
+ target_copy BIGINT NOT NULL, -- points o asset.copy
+ part INT NOT NULL REFERENCES biblio.monograph_part (id) ON DELETE CASCADE
+);
+CREATE UNIQUE INDEX copy_part_map_cp_part_idx ON asset.copy_part_map (target_copy, part);
+
CREATE OR REPLACE FUNCTION asset.normalize_affix_sortkey () RETURNS TRIGGER AS $$
BEGIN
NEW.label_sortkey := REGEXP_REPLACE(
'coust', 'label'),
oils_i18n_gettext(
'ui.cat.volume_copy_editor.horizontal',
- 'The main entry point for this interface is in Holdings Maintenance, Actions for Selected Rows, Edit Item Attributes / Call Numbers / Replace Barcodes. This setting changes the top and bottom panes for that interface into left and right panes.',+ 'coust', 'description'),
+ 'The main entry point for this interface is in Holdings Maintenance, Actions for Selected Rows, Edit Item Attributes / Call Numbers / Replace Barcodes. This setting changes the top and bottom panes for that interface into left and right panes.',
+ 'coust', 'description'),
'bool'
);