...
Jira Legacy |
---|
server | System Jira |
---|
columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 01505d01-b853-3c2e-90f1-ee9b165564fc |
---|
key | MODINVSTOR-1094 |
---|
|
Important!
The manual migration was included in module migrations inĀ
Jira Legacy |
---|
server | System Jira |
---|
serverId | 01505d01-b853-3c2e-90f1-ee9b165564fc |
---|
key | MODINVSTOR-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 |
---|
language | sql |
---|
title | Count impacted hodlings |
---|
collapse | true |
---|
|
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
...