Versions Compared

Key

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

...

Jira Legacy
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODINVSTOR-1094


Important!

The manual migration was included in module migrations inĀ 

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyMODINVSTOR-1189
. The instructions for manual script only apply if there are more than 3M affected holding records in the tenant database. If there are more affected records, then the manual script should be applied first and module should be enabled after script is done.

To check the amount of affected records one can use the following script:

Code Block
languagesql
titleCount impacted hodlings
collapsetrue
do
$$
    declare
        tenant    varchar;
        count_all int;
        count     int;
    begin
        for tenant in
            select tenantjson -> 'descriptor' ->> 'id'
            from public.tenants
            where tenantjson -> 'descriptor' ->> 'id' <> 'supertenant'
            --                 and tenantjson -> 'descriptor' ->> 'id' in (
--                     'college'
--                 )
            loop
                execute format($count$
                SELECT count(*)
                from %s_mod_inventory_storage.holdings_record
                   $count$, tenant)
                    into count_all;
                execute format($count$
                SELECT count(*)
                from %s_mod_inventory_storage.holdings_record
                WHERE jsonb ? 'permanentLocation'
                   OR jsonb ? 'illPolicy'
                   OR jsonb ? 'holdingsItems'
                   OR jsonb ? 'bareHoldingsItems'
                   OR jsonb ? 'holdingsInstance'
                   $count$, tenant)
                    into count;

                raise info 'tenant: % - % of %', tenant, count, count_all;

            end loop;
    end
$$ language plpgsql;


Instructions for a single-tenant environment

...