Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
titleAction script
collapsetrue
ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER audit_holdings_record;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER set_holdings_record_md_json_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER set_holdings_record_md_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER set_holdings_record_ol_version_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER set_id_in_jsonb;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER update_holdings_record_references;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER updatecompleteupdateddate_holdings_record_delete;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  DISABLE TRIGGER updatecompleteupdateddate_holdings_record_insert_update;

UPDATE {tenant_name}_mod_inventory_storage.holdings_record
	SET jsonb=jsonb - 'permanentLocation' - 'illPolicy' - 'holdingsItems' - 'bareHoldingsItems' - 'holdingsInstance'
    WHERE jsonb ? 'permanentLocation' 
    OR jsonb ? 'illPolicy' 
    OR jsonb ? 'holdingsItems' 
    OR jsonb ? 'bareHoldingsItems' 
    OR jsonb ? 'holdingsInstance';

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER audit_holdings_record;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER set_holdings_record_md_json_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER set_holdings_record_md_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER set_holdings_record_ol_version_trigger;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER set_id_in_jsonb;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER update_holdings_record_references;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER updatecompleteupdateddate_holdings_record_delete;

ALTER TABLE {tenant_name}_mod_inventory_storage.holdings_record
  ENABLE TRIGGER updatecompleteupdateddate_holdings_record_insert_update;

Action timing:

TBD (will be tested in scope of bugfest preparation)