Skip to end of banner
Go to start of banner

Quesnelia (R1 2024): Holdings migration

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Context

MODINVSTOR-1094 - Getting issue details... STATUS

Instructions

Step 1

Run time:

Before or after upgrade

Action:

Step 1.

Run script: 

Action script
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)

  • No labels