toc.dat0000600 0004000 0002000 00000526341 14125567623 0014465 0ustar00postgrespostgres0000000 0000000 PGDMP9 y okapi_modules 12.8 (Ubuntu 12.8-1.pgdg20.04+1)13.3*)00ENCODINGENCODINGSET client_encoding = 'UTF8'; false)00 STDSTRINGS STDSTRINGS(SET standard_conforming_strings = 'on'; false)00 SEARCHPATH SEARCHPATH8SELECT pg_catalog.set_config('search_path', '', false); false)126216458 okapi_modulesDATABASEbCREATE DATABASE okapi_modules WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.UTF-8'; DROP DATABASE okapi_modules;  folio_adminfalse 261516555diku_mod_finance_storageSCHEMA(CREATE SCHEMA diku_mod_finance_storage; &DROP SCHEMA diku_mod_finance_storage; diku_mod_finance_storagefalse125517155#budget_encumbrances_rollover(jsonb)FUNCTION"CREATE FUNCTION diku_mod_finance_storage.budget_encumbrances_rollover(_rollover_record jsonb) RETURNS void LANGUAGE plpgsql AS $$ DECLARE toFiscalYear jsonb; fromFiscalYear jsonb; temprow record; BEGIN SELECT INTO toFiscalYear (jsonb::jsonb) FROM diku_mod_finance_storage.fiscal_year WHERE _rollover_record->>'toFiscalYearId'=jsonb->>'id'; SELECT INTO fromFiscalYear (jsonb::jsonb) FROM diku_mod_finance_storage.fiscal_year WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'id'; -- #1 Upsert budgets INSERT INTO diku_mod_finance_storage.budget ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER5', budget.id, fund.id)), diku_mod_finance_storage.build_budget(budget.jsonb, fund.jsonb, _rollover_record, toFiscalYear) FROM diku_mod_finance_storage.budget AS budget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id=budget.fundId WHERE fund.jsonb->>'fundStatus'<>'Inactive' AND budget.jsonb->>'fiscalYearId'=_rollover_record->>'fromFiscalYearId' AND fund.jsonb->>'ledgerId'=_rollover_record->>'ledgerId' ) ON CONFLICT (lower(diku_mod_finance_storage.f_unaccent(jsonb ->> 'fundId'::text)), lower(diku_mod_finance_storage.f_unaccent(jsonb ->> 'fiscalYearId'::text))) DO UPDATE SET jsonb=diku_mod_finance_storage.budget.jsonb || jsonb_build_object ( 'allocationTo', (diku_mod_finance_storage.budget.jsonb->>'allocationTo')::decimal + (EXCLUDED.jsonb->>'initialAllocation')::decimal, 'netTransfers', (diku_mod_finance_storage.budget.jsonb->>'netTransfers')::decimal + (EXCLUDED.jsonb->>'netTransfers')::decimal, 'metadata', diku_mod_finance_storage.budget.jsonb->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)); -- #1.1 Create budget expense class relations for new budgets INSERT INTO diku_mod_finance_storage.budget_expense_class SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER6', oldBudget.id, fund.id, newBudget.id, exp.id)), jsonb_build_object('budgetId', newBudget.id, 'expenseClassId', exp.jsonb->>'expenseClassId', 'status', exp.jsonb->>'status') FROM diku_mod_finance_storage.budget AS oldBudget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget AS newBudget ON newBudget.fundId = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget_expense_class AS exp ON oldBudget.id = exp.budgetid WHERE oldBudget.jsonb ->> 'fiscalYearId' = _rollover_record->>'fromFiscalYearId' AND fund.jsonb ->> 'ledgerId' = _rollover_record->>'ledgerId' AND newBudget.jsonb->>'fiscalYearId' = _rollover_record->>'toFiscalYearId' ON CONFLICT DO NOTHING; -- #1.2 Create budget groups relation for new budgets INSERT INTO diku_mod_finance_storage.group_fund_fiscal_year SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER7', oldBudget.id, fund.id, newBudget.id, gr.id)), jsonb_build_object('budgetId', newBudget.id, 'groupId', gr.jsonb->>'groupId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'fundId', gr.jsonb->>'fundId') FROM diku_mod_finance_storage.budget AS oldBudget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget AS newBudget ON newBudget.fundId = oldBudget.fundId INNER JOIN diku_mod_finance_storage.group_fund_fiscal_year AS gr ON oldBudget.id = gr.budgetid WHERE oldBudget.jsonb ->> 'fiscalYearId' = _rollover_record->>'fromFiscalYearId' AND fund.jsonb ->> 'ledgerId' = _rollover_record->>'ledgerId' AND newBudget.jsonb->>'fiscalYearId' = _rollover_record->>'toFiscalYearId' ON CONFLICT DO NOTHING; -- #2 Create allocations INSERT INTO diku_mod_finance_storage.transaction ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER8', budget.jsonb->>'id')), jsonb_build_object('toFundId', budget.jsonb->>'fundId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'transactionType', 'Allocation', 'source', 'User', 'currency', toFiscalYear->>'currency', 'amount', (budget.jsonb->>'initialAllocation')::decimal+ (budget.jsonb->>'allocationTo')::decimal- (budget.jsonb->>'allocationFrom')::decimal- sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)) FROM diku_mod_finance_storage.budget AS budget LEFT JOIN diku_mod_finance_storage.transaction AS tr_to ON budget.fundId=tr_to.toFundId AND budget.fiscalYearId=tr_to.fiscalYearId AND tr_to.jsonb->>'transactionType'='Allocation' LEFT JOIN diku_mod_finance_storage.transaction AS tr_from ON budget.fundId=tr_from.fromFundId AND budget.fiscalYearId=tr_from.fiscalYearId AND tr_from.jsonb->>'transactionType'='Allocation' WHERE budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' GROUP BY budget.jsonb HAVING (budget.jsonb->>'initialAllocation')::decimal+(budget.jsonb->>'allocationTo')::decimal-(budget.jsonb->>'allocationFrom')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)) <> 0 ); -- #3 Create transfers INSERT INTO diku_mod_finance_storage.transaction ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER9', budget.jsonb->>'id')), jsonb_build_object('toFundId', budget.jsonb->>'fundId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'transactionType', 'Rollover transfer', 'source', 'User', 'currency', toFiscalYear->>'currency', 'amount', (budget.jsonb->>'netTransfers')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)) FROM diku_mod_finance_storage.budget AS budget LEFT JOIN diku_mod_finance_storage.transaction AS tr_to ON budget.fundId=tr_to.toFundId AND budget.fiscalYearId=tr_to.fiscalYearId AND tr_to.jsonb->>'transactionType'='Transfer' LEFT JOIN diku_mod_finance_storage.transaction AS tr_from ON budget.fundId=tr_from.fromFundId AND budget.fiscalYearId=tr_from.fiscalYearId AND tr_from.jsonb->>'transactionType'='Transfer' WHERE budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' GROUP BY budget.jsonb HAVING (budget.jsonb->>'netTransfers')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)) <> 0 ); -- #4 sort order ids FOR temprow IN SELECT min(tr.jsonb->'metadata'->>'createdDate') date, tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId' order_id FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId LEFT JOIN diku_mod_finance_storage.ledger ledger ON ledger.id=fund.ledgerId WHERE tr.jsonb->>'transactionType' = 'Encumbrance' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND tr.jsonb->'encumbrance'->>'orderStatus' = 'Open' AND (tr.jsonb->'encumbrance'->>'reEncumber')::boolean AND ledger.id::text=_rollover_record->>'ledgerId' GROUP BY order_id ORDER BY date LOOP PERFORM diku_mod_finance_storage.rollover_order(temprow.order_id::text, _rollover_record); END LOOP; END; $$; ]DROP FUNCTION diku_mod_finance_storage.budget_encumbrances_rollover(_rollover_record jsonb); diku_mod_finance_storage folio_adminfalse12{125516817budget_set_md()FUNCTIONmCREATE FUNCTION diku_mod_finance_storage.budget_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; 8DROP FUNCTION diku_mod_finance_storage.budget_set_md(); diku_mod_finance_storage folio_adminfalse12125517154(build_budget(jsonb, jsonb, jsonb, jsonb)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.build_budget(_budget jsonb, _fund jsonb, _rollover_record jsonb, _fiscal_year jsonb) RETURNS jsonb LANGUAGE plpgsql AS $$ DECLARE budget_rollover jsonb; newAllocated decimal; newNetTransfers decimal; allocated decimal; totalFunding decimal; available decimal; unavailable decimal; allowableEncumbrance decimal; allowableExpenditure decimal; metadata jsonb; result_budget jsonb; BEGIN SELECT br INTO budget_rollover FROM jsonb_array_elements(_rollover_record->'budgetsRollover') br WHERE br->>'fundTypeId'=_fund->>'fundTypeId' OR (NOT br ? 'fundTypeId' AND NOT _fund ? 'fundTypeId'); allocated := (_budget->>'initialAllocation')::decimal + (_budget->>'allocationTo')::decimal - (_budget->>'allocationFrom')::decimal; totalFunding := allocated + (_budget->>'netTransfers')::decimal; unavailable := (_budget->>'encumbered')::decimal + (_budget->>'expenditures')::decimal + (_budget->>'awaitingPayment')::decimal; available := totalFunding - unavailable; IF (budget_rollover->>'rolloverAllocation')::boolean THEN newAllocated := allocated; ELSE newAllocated := 0; END IF; IF (budget_rollover->>'rolloverAvailable')::boolean THEN newNetTransfers := available; ELSE newNetTransfers := 0; END IF; IF (budget_rollover->>'setAllowances')::boolean THEN allowableEncumbrance := budget_rollover->>'allowableEncumbrance'; allowableExpenditure := budget_rollover->>'allowableExpenditure'; ELSE allowableEncumbrance := _budget->>'allowableEncumbrance'; allowableExpenditure := _budget->>'allowableExpenditure'; END IF; newAllocated := newAllocated + CASE WHEN budget_rollover ? 'adjustAllocation' AND (budget_rollover->>'rolloverAllocation')::boolean THEN allocated*(budget_rollover->>'adjustAllocation')::decimal/100 ELSE 0 END; IF budget_rollover->>'addAvailableTo'='Allocation' THEN newAllocated := newAllocated + newNetTransfers; newNetTransfers := 0; END IF; metadata := _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text); result_budget := (_budget - 'id' - 'allowableEncumbrance' - 'allowableExpenditure') || jsonb_build_object ( 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'name', (_fund->>'code') || '-' || (_fiscal_year->>'code'), 'initialAllocation', newAllocated, 'allocationTo', 0, 'allocationFrom', 0, 'metadata', metadata, 'budgetStatus', 'Active', 'netTransfers', newNetTransfers, 'awaitingPayment', 0, 'encumbered', 0, 'expenditures', 0 ); IF allowableEncumbrance is not null THEN result_budget := result_budget || jsonb_build_object('allowableEncumbrance', allowableEncumbrance); END IF; IF allowableExpenditure is not null THEN result_budget := result_budget || jsonb_build_object('allowableExpenditure', allowableExpenditure); END IF; RETURN result_budget; END; $$; }DROP FUNCTION diku_mod_finance_storage.build_budget(_budget jsonb, _fund jsonb, _rollover_record jsonb, _fiscal_year jsonb); diku_mod_finance_storage folio_adminfalse12125517151;calculate_planned_encumbrance_amount(jsonb, jsonb, boolean)FUNCTION CREATE FUNCTION diku_mod_finance_storage.calculate_planned_encumbrance_amount(_transaction jsonb, _rollover_record jsonb, _rounding boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE amount DECIMAL DEFAULT 0; encumbrance_rollover jsonb DEFAULT null; po_line_cost DECIMAL DEFAULT 0; total_amount DECIMAL DEFAULT 0; distribution_value DECIMAL DEFAULT 0; BEGIN SELECT sum((jsonb->'encumbrance'->>'initialAmountEncumbered')::decimal) INTO po_line_cost FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; distribution_value := 0; IF po_line_cost > 0 THEN distribution_value := (_transaction->'encumbrance'->>'initialAmountEncumbered')::decimal/po_line_cost; END IF; IF _transaction->'encumbrance'->>'orderType'='Ongoing' AND (_transaction->'encumbrance'->>'subscription')::boolean THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='Ongoing-Subscription'; ELSIF _transaction->'encumbrance'->>'orderType'='Ongoing' THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='Ongoing'; ELSIF _transaction->'encumbrance'->>'orderType'='One-Time' THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='One-time'; END IF; IF encumbrance_rollover->>'basedOn'='Expended' THEN SELECT sum((jsonb->'encumbrance'->>'amountExpended')::decimal) INTO total_amount FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; ELSE SELECT sum((jsonb->>'amount')::decimal) INTO total_amount FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; END IF; total_amount:= total_amount + total_amount * (encumbrance_rollover->>'increaseBy')::decimal/100; amount := total_amount * distribution_value; IF _rounding IS NOT NULL AND _rounding THEN RETURN ROUND(amount,(_rollover_record->>'currencyFactor')::integer); ELSE RETURN amount; END IF; END; $$; DROP FUNCTION diku_mod_finance_storage.calculate_planned_encumbrance_amount(_transaction jsonb, _rollover_record jsonb, _rounding boolean); diku_mod_finance_storage folio_adminfalse12o125516693concat_array_object(jsonb)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.concat_array_object(jsonb_array jsonb) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value::text, ' ') FROM jsonb_array_elements_text($1); $_$; ODROP FUNCTION diku_mod_finance_storage.concat_array_object(jsonb_array jsonb); diku_mod_finance_storage folio_adminfalse12l125516690'concat_array_object_values(jsonb, text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1); $_$; bDROP FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text); diku_mod_finance_storage folio_adminfalse12m1255166913concat_array_object_values(jsonb, text, text, text)FUNCTION*CREATE FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1) WHERE value->>$3 = $4; $_$; DROP FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text, filterkey text, filtervalue text); diku_mod_finance_storage folio_adminfalse12k125516689concat_space_sql(text[])FUNCTIONCREATE FUNCTION diku_mod_finance_storage.concat_space_sql(VARIADIC text[]) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ select concat_ws(' ', VARIADIC $1); $_$; JDROP FUNCTION diku_mod_finance_storage.concat_space_sql(VARIADIC text[]); diku_mod_finance_storage folio_adminfalse12b125516680count_estimate(text)FUNCTION,CREATE FUNCTION diku_mod_finance_storage.count_estimate(query text) RETURNS bigint LANGUAGE plpgsql STABLE STRICT AS $$ DECLARE count bigint; est_count bigint; q text; BEGIN est_count = diku_mod_finance_storage.count_estimate_smart2(20000, 20000, query); IF est_count > 4*20000 THEN RETURN est_count; END IF; q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 20000) x'; EXECUTE q INTO count; IF count < 20000 THEN RETURN count; END IF; IF est_count < 20000 THEN RETURN 20000; END IF; RETURN est_count; END; $$; CDROP FUNCTION diku_mod_finance_storage.count_estimate(query text); diku_mod_finance_storage folio_adminfalse12a125516679count_estimate_default(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.count_estimate_default(query text) RETURNS bigint LANGUAGE plpgsql IMMUTABLE STRICT AS $$ DECLARE rows bigint; q text; BEGIN q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 20000) x'; EXECUTE q INTO rows; IF rows < 20000 THEN return rows; END IF; rows = diku_mod_finance_storage.count_estimate_smart2(20000, 20000, query); IF rows < 20000 THEN return 20000; END IF; RETURN rows; END; $$; KDROP FUNCTION diku_mod_finance_storage.count_estimate_default(query text); diku_mod_finance_storage folio_adminfalse12`125516678+count_estimate_smart2(bigint, bigint, text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.count_estimate_smart2(rows bigint, lim bigint, query text) RETURNS bigint LANGUAGE plpgsql STRICT AS $$ DECLARE rec record; cnt bigint; BEGIN IF rows = lim THEN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP cnt := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN cnt IS NOT NULL; END LOOP; RETURN cnt; END IF; RETURN rows; END; $$; cDROP FUNCTION diku_mod_finance_storage.count_estimate_smart2(rows bigint, lim bigint, query text); diku_mod_finance_storage folio_adminfalse12d125516682f_unaccent(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $_$; 9DROP FUNCTION diku_mod_finance_storage.f_unaccent(text); diku_mod_finance_storage folio_adminfalse12n1255166921first_array_object_value(jsonb, text, text, text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.first_array_object_value(jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT value->>$2 FROM jsonb_array_elements($1) WHERE value->>$3 = $4 LIMIT 1; $_$; DROP FUNCTION diku_mod_finance_storage.first_array_object_value(jsonb_array jsonb, field text, filterkey text, filtervalue text); diku_mod_finance_storage folio_adminfalse12r125516720fiscal_year_set_md()FUNCTIONrCREATE FUNCTION diku_mod_finance_storage.fiscal_year_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; =DROP FUNCTION diku_mod_finance_storage.fiscal_year_set_md(); diku_mod_finance_storage folio_adminfalse12x125516788 fund_set_md()FUNCTIONkCREATE FUNCTION diku_mod_finance_storage.fund_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; 6DROP FUNCTION diku_mod_finance_storage.fund_set_md(); diku_mod_finance_storage folio_adminfalse12e125516683get_tsvector(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.get_tsvector(text) RETURNS tsvector LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT to_tsvector('simple', translate($1, '&', ',')); $_$; ;DROP FUNCTION diku_mod_finance_storage.get_tsvector(text); diku_mod_finance_storage folio_adminfalse12125516907groups_set_md()FUNCTIONmCREATE FUNCTION diku_mod_finance_storage.groups_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; 8DROP FUNCTION diku_mod_finance_storage.groups_set_md(); diku_mod_finance_storage folio_adminfalse12125517126*ledger_fiscal_year_rollover_error_set_md()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; SDROP FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md(); diku_mod_finance_storage folio_adminfalse12125517102-ledger_fiscal_year_rollover_progress_set_md()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; VDROP FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md(); diku_mod_finance_storage folio_adminfalse12125517079$ledger_fiscal_year_rollover_set_md()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; MDROP FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md(); diku_mod_finance_storage folio_adminfalse12u125516747ledger_set_md()FUNCTIONmCREATE FUNCTION diku_mod_finance_storage.ledger_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; 8DROP FUNCTION diku_mod_finance_storage.ledger_set_md(); diku_mod_finance_storage folio_adminfalse12S125516675next_uuid(uuid)FUNCTION CREATE FUNCTION diku_mod_finance_storage.next_uuid(uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ DECLARE uuid text; digit text; BEGIN uuid = $1; FOR i IN REVERSE 36..1 LOOP digit := substring(uuid from i for 1); -- skip minus, version byte M and variant byte N CONTINUE WHEN digit = '-' OR i = 15 OR i = 20; CASE digit WHEN '0' THEN digit := '1'; WHEN '1' THEN digit := '2'; WHEN '2' THEN digit := '3'; WHEN '3' THEN digit := '4'; WHEN '4' THEN digit := '5'; WHEN '5' THEN digit := '6'; WHEN '6' THEN digit := '7'; WHEN '7' THEN digit := '8'; WHEN '8' THEN digit := '9'; WHEN '9' THEN digit := 'a'; WHEN 'a' THEN digit := 'b'; WHEN 'b' THEN digit := 'c'; WHEN 'c' THEN digit := 'd'; WHEN 'd' THEN digit := 'e'; WHEN 'e' THEN digit := 'f'; WHEN 'f' THEN digit := '0'; ELSE NULL; END CASE; uuid = overlay(uuid placing digit from i); EXIT WHEN digit <> '0'; END LOOP; RETURN uuid; END; $_$; 8DROP FUNCTION diku_mod_finance_storage.next_uuid(uuid); diku_mod_finance_storage folio_adminfalse12i125516687normalize_digits(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.normalize_digits(text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT translate((regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1], E' \t-', '') || CASE WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1] = '' THEN '' WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2] = '' THEN '' ELSE ' ' END || (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2]; $_$; ?DROP FUNCTION diku_mod_finance_storage.normalize_digits(text); diku_mod_finance_storage folio_adminfalse12q125516694*rmb_internal_index(text, text, text, text)FUNCTION3CREATE FUNCTION diku_mod_finance_storage.rmb_internal_index(atable text, aname text, tops text, newdef text) RETURNS void LANGUAGE plpgsql AS $_$ DECLARE olddef text; namep CONSTANT text = concat(aname, '_p'); prepareddef text; BEGIN IF tops = 'DELETE' THEN -- use case insensitive %s, not case sensitive %I -- no SQL injection because the names are hard-coded in schema.json EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE 'DELETE FROM diku_mod_finance_storage.rmb_internal_index WHERE name = $1' USING aname; RETURN; END IF; SELECT def INTO olddef FROM diku_mod_finance_storage.rmb_internal_index WHERE name = aname; SELECT def INTO prepareddef FROM diku_mod_finance_storage.rmb_internal_index WHERE name = namep; prepareddef = replace(prepareddef, concat(' ', namep, ' ON '), concat(' ', aname, ' ON ')); IF prepareddef = newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE format('ALTER INDEX IF EXISTS %s RENAME TO %s', namep, aname); EXECUTE 'DELETE FROM rmb_internal_index WHERE name = $1' USING namep; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; ELSIF olddef IS DISTINCT FROM newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE newdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; END IF; EXECUTE 'INSERT INTO diku_mod_finance_storage.rmb_internal_index VALUES ($1, $2, FALSE) ' 'ON CONFLICT (name) DO UPDATE SET def = EXCLUDED.def, remove = EXCLUDED.remove' USING aname, newdef; END $_$; lDROP FUNCTION diku_mod_finance_storage.rmb_internal_index(atable text, aname text, tops text, newdef text); diku_mod_finance_storage folio_adminfalse12125517152rollover_order(text, jsonb)FUNCTIONP9CREATE FUNCTION diku_mod_finance_storage.rollover_order(_order_id text, _rollover_record jsonb) RETURNS void LANGUAGE plpgsql AS $$ DECLARE missing_penny_with_po_line refcursor; missing_penny_row record; missing_penny_transaction_id text; BEGIN -- #9 create encumbrances to temp table CREATE TEMPORARY TABLE tmp_transaction(LIKE diku_mod_finance_storage.transaction); INSERT INTO tmp_transaction(id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER1', tr.id)), jsonb - 'id' || jsonb_build_object ( 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'encumbrance', jsonb->'encumbrance' || jsonb_build_object ( 'initialAmountEncumbered', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'amountAwaitingPayment', 0, 'amountExpended', 0 ), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text) ) FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id AND tr.jsonb->>'fiscalYearId'=_rollover_record->>'fromFiscalYearId' AND (tr.jsonb->'encumbrance'->>'reEncumber')::boolean AND tr.jsonb->'encumbrance'->>'orderStatus'='Open'; -- #9.1 calculate and add missing penny to appropriate temp transaction -- find poLines and calculate missing penny amount for that poLine if any OPEN missing_penny_with_po_line FOR SELECT po.id as po_line_id, (round((SELECT sum(diku_mod_finance_storage.calculate_planned_encumbrance_amount(jsonb, _rollover_record, false)) - sum(diku_mod_finance_storage.calculate_planned_encumbrance_amount(jsonb, _rollover_record, true)) penny FROM diku_mod_finance_storage.transaction WHERE _rollover_record ->> 'fromFiscalYearId' = jsonb ->> 'fiscalYearId' AND jsonb -> 'encumbrance' ->> 'sourcePoLineId' = po.id GROUP BY jsonb -> 'encumbrance' ->> 'sourcePoLineId'), (_rollover_record ->> 'currencyFactor')::integer)) as penny FROM ( SELECT DISTINCT tr.jsonb -> 'encumbrance' ->> 'sourcePoLineId' as id FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb -> 'encumbrance' ->> 'sourcePurchaseOrderId' = _order_id AND _rollover_record ->> 'fromFiscalYearId' = jsonb ->> 'fiscalYearId' ) po; -- if missing penny for poLines exist then find transaction (first or last) and add that missing amount to them LOOP FETCH missing_penny_with_po_line INTO missing_penny_row; EXIT WHEN NOT found; IF missing_penny_row.penny IS NOT NULL AND missing_penny_row.penny != 0 THEN missing_penny_transaction_id := ( SELECT id FROM tmp_transaction WHERE _rollover_record ->> 'toFiscalYearId' = jsonb ->> 'fiscalYearId' AND jsonb -> 'encumbrance' ->> 'sourcePoLineId' = missing_penny_row.po_line_id ORDER BY CASE WHEN missing_penny_row.penny < 0 THEN jsonb -> 'metadata' ->> 'createdDate' END, CASE WHEN missing_penny_row.penny > 0 THEN jsonb -> 'metadata' ->> 'createdDate' END DESC LIMIT 1 ); IF missing_penny_transaction_id IS NOT NULL THEN UPDATE tmp_transaction as tr SET jsonb = jsonb_set( jsonb || jsonb_build_object('amount', (jsonb ->> 'amount')::decimal + missing_penny_row.penny), '{encumbrance,initialAmountEncumbered}', ((jsonb -> 'encumbrance' ->> 'initialAmountEncumbered')::decimal + missing_penny_row.penny)::text::jsonb) WHERE missing_penny_transaction_id = id::text; END IF; END IF; END LOOP; CLOSE missing_penny_with_po_line; IF -- #5 EXISTS (SELECT * FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId LEFT JOIN diku_mod_finance_storage.ledger_fiscal_year_rollover rollover ON rollover.ledgerId = fund.ledgerId LEFT JOIN diku_mod_finance_storage.ledger_fiscal_year_rollover_progress rollover_progress ON rollover.id = rollover_progress.ledgerRolloverId WHERE fund.ledgerId::text<>_rollover_record->>'ledgerId' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND (rollover_progress.jsonb IS NULL OR rollover_progress.jsonb->>'overallRolloverStatus'='Not Started' OR rollover_progress.jsonb->>'overallRolloverStatus'='In Progress') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id) THEN -- #6 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER2', tr.id, fund.id)), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Part of the encumbrances belong to the ledger, which has not been rollovered', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.fromFundId::text ) ) FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId WHERE fund.ledgerId::text=_rollover_record->>'ledgerId' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id; ELSEIF -- #10 EXISTS (SELECT tr.jsonb as transaction FROM diku_mod_finance_storage.transaction tr WHERE NOT EXISTS (SELECT * FROM diku_mod_finance_storage.budget budget WHERE tr.fromFundId=budget.fundId AND budget.fiscalYearId::text = _rollover_record->>'toFiscalYearId') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'= _order_id AND tr.fiscalYearId::text= _rollover_record->>'fromFiscalYearId') THEN -- #11 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER3', tr.id)), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Budget not found', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.jsonb->>'fromFundId' ) ) FROM diku_mod_finance_storage.transaction tr WHERE NOT EXISTS (SELECT * FROM diku_mod_finance_storage.budget budget WHERE tr.fromFundId=budget.fundId AND budget.fiscalYearId::text = _rollover_record->>'toFiscalYearId') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'= _order_id AND tr.fiscalYearId::text= _rollover_record->>'fromFiscalYearId'; ELSEIF -- #7 (_rollover_record->>'restrictEncumbrance')::boolean AND EXISTS (SELECT sum((tr.jsonb->>'amount')::decimal) FROM tmp_transaction tr LEFT JOIN diku_mod_finance_storage.budget budget ON tr.jsonb->>'fromFundId' = budget.fundId::text WHERE budget.jsonb ->> 'allowableEncumbrance' IS NOT NULL AND tr.jsonb -> 'encumbrance' ->> 'sourcePurchaseOrderId' = _order_id AND tr.jsonb->>'fiscalYearId' = _rollover_record ->> 'toFiscalYearId' AND budget.fiscalYearId::text = _rollover_record ->> 'toFiscalYearId' GROUP BY budget.jsonb, tr.jsonb ->> 'fromFundId' HAVING sum((tr.jsonb->>'amount')::decimal) > ((budget.jsonb->>'initialAllocation')::decimal + (budget.jsonb->>'allocationTo')::decimal - (budget.jsonb->>'allocationFrom')::decimal + (budget.jsonb->>'netTransfers')::decimal) * (budget.jsonb->>'allowableEncumbrance')::decimal/100 - (budget.jsonb->>'encumbered')::decimal) THEN -- #8 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER4', tr.id, summary.budget->>'id')), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Insufficient funds', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.jsonb->>'fromFundId' ) ) FROM diku_mod_finance_storage.transaction tr INNER JOIN ( SELECT budget.jsonb AS budget FROM tmp_transaction tr LEFT JOIN diku_mod_finance_storage.budget budget ON tr.jsonb->>'fromFundId'=budget.fundId::text WHERE budget.jsonb->>'allowableEncumbrance' IS NOT NULL AND tr.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' AND budget.fiscalYearId::text=_rollover_record->>'toFiscalYearId' GROUP BY tr.jsonb->>'fromFundId', budget.jsonb HAVING sum((tr.jsonb->>'amount')::decimal) > ((budget.jsonb->>'initialAllocation')::decimal + (budget.jsonb->>'allocationTo')::decimal - (budget.jsonb->>'allocationFrom')::decimal + (budget.jsonb->>'netTransfers')::decimal) * (budget.jsonb->>'allowableEncumbrance')::decimal/100 - (budget.jsonb->>'encumbered')::decimal ) as summary ON summary.budget->>'fundId'=tr.jsonb->>'fromFundId' WHERE tr.jsonb->>'transactionType'='Encumbrance' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id AND tr.fiscalYearId::text=_rollover_record->>'fromFiscalYearId'; ELSE -- #9.2 move transactions from temp table to permanent INSERT INTO diku_mod_finance_storage.transaction SELECT * FROM tmp_transaction; END IF; -- #10 update budget amounts UPDATE diku_mod_finance_storage.budget as budget SET jsonb = budget.jsonb || jsonb_build_object('encumbered', (budget.jsonb->>'encumbered')::decimal + subquery.amount) FROM ( SELECT tr.jsonb->>'fromFundId' as fund_id, sum((tr.jsonb->>'amount')::decimal) AS amount FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id GROUP BY tr.jsonb->>'fromFundId' ) AS subquery LEFT JOIN diku_mod_finance_storage.fund fund ON subquery.fund_id=fund.id::text WHERE subquery.fund_id=budget.jsonb->>'fundId' AND fund.jsonb->>'ledgerId'=_rollover_record->>'ledgerId' AND budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId'; DROP TABLE IF EXISTS tmp_transaction; END; $$; _DROP FUNCTION diku_mod_finance_storage.rollover_order(_order_id text, _rollover_record jsonb); diku_mod_finance_storage folio_adminfalse12M125516819set_budget_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_budget_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; =DROP FUNCTION diku_mod_finance_storage.set_budget_md_json(); diku_mod_finance_storage folio_adminfalse12s125516722set_fiscal_year_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; BDROP FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json(); diku_mod_finance_storage folio_adminfalse12y125516790set_fund_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_fund_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ;DROP FUNCTION diku_mod_finance_storage.set_fund_md_json(); diku_mod_finance_storage folio_adminfalse12125516909set_groups_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_groups_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; =DROP FUNCTION diku_mod_finance_storage.set_groups_md_json(); diku_mod_finance_storage folio_adminfalse12j125516688set_id_in_jsonb()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_id_in_jsonb() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.jsonb = jsonb_set(NEW.jsonb, '{id}', to_jsonb(NEW.id)); RETURN NEW; END; $$; :DROP FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); diku_mod_finance_storage folio_adminfalse12125517128/set_ledger_fiscal_year_rollover_error_md_json()FUNCTION CREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; XDROP FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json(); diku_mod_finance_storage folio_adminfalse12125517081)set_ledger_fiscal_year_rollover_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; RDROP FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json(); diku_mod_finance_storage folio_adminfalse121255171042set_ledger_fiscal_year_rollover_progress_md_json()FUNCTION CREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; [DROP FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json(); diku_mod_finance_storage folio_adminfalse12v125516749set_ledger_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_ledger_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; =DROP FUNCTION diku_mod_finance_storage.set_ledger_md_json(); diku_mod_finance_storage folio_adminfalse12~125516892set_transaction_md_json()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.set_transaction_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; BDROP FUNCTION diku_mod_finance_storage.set_transaction_md_json(); diku_mod_finance_storage folio_adminfalse12}125516890transaction_set_md()FUNCTIONrCREATE FUNCTION diku_mod_finance_storage.transaction_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; =DROP FUNCTION diku_mod_finance_storage.transaction_set_md(); diku_mod_finance_storage folio_adminfalse12f125516684tsquery_and(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.tsquery_and(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT to_tsquery('simple', string_agg(CASE WHEN length(v) = 0 OR v = '*' THEN '' WHEN right(v, 1) = '*' THEN '''' || left(v, -1) || ''':*' ELSE '''' || v || '''' END, '&')) FROM (SELECT regexp_split_to_table(translate($1, '&''', ',,'), ' +')) AS x(v); $_$; :DROP FUNCTION diku_mod_finance_storage.tsquery_and(text); diku_mod_finance_storage folio_adminfalse12g125516685tsquery_or(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.tsquery_or(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT replace(diku_mod_finance_storage.tsquery_and($1)::text, '&', '|')::tsquery; $_$; 9DROP FUNCTION diku_mod_finance_storage.tsquery_or(text); diku_mod_finance_storage folio_adminfalse12h125516686tsquery_phrase(text)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.tsquery_phrase(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT replace(diku_mod_finance_storage.tsquery_and($1)::text, '&', '<->')::tsquery; $_$; =DROP FUNCTION diku_mod_finance_storage.tsquery_phrase(text); diku_mod_finance_storage folio_adminfalse12N125516843(update_budget_expense_class_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_budget_expense_class_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.budgetId = (NEW.jsonb->>'budgetId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; QDROP FUNCTION diku_mod_finance_storage.update_budget_expense_class_references(); diku_mod_finance_storage folio_adminfalse12z125516815update_budget_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_budget_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fundId = (NEW.jsonb->>'fundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); RETURN NEW; END; $$; CDROP FUNCTION diku_mod_finance_storage.update_budget_references(); diku_mod_finance_storage folio_adminfalse12w125516786update_fund_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_fund_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerId = (NEW.jsonb->>'ledgerId'); NEW.fundTypeId = (NEW.jsonb->>'fundTypeId'); RETURN NEW; END; $$; ADROP FUNCTION diku_mod_finance_storage.update_fund_references(); diku_mod_finance_storage folio_adminfalse12125516945*update_group_fund_fiscal_year_references()FUNCTIONnCREATE FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.budgetId = (NEW.jsonb->>'budgetId'); NEW.groupId = (NEW.jsonb->>'groupId'); NEW.fundId = (NEW.jsonb->>'fundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); RETURN NEW; END; $$; SDROP FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references(); diku_mod_finance_storage folio_adminfalse121255171245update_ledger_fiscal_year_rollover_error_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerRolloverId = (NEW.jsonb->>'ledgerRolloverId'); RETURN NEW; END; $$; ^DROP FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references(); diku_mod_finance_storage folio_adminfalse121255171008update_ledger_fiscal_year_rollover_progress_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerRolloverId = (NEW.jsonb->>'ledgerRolloverId'); RETURN NEW; END; $$; aDROP FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references(); diku_mod_finance_storage folio_adminfalse12125517077/update_ledger_fiscal_year_rollover_references()FUNCTION^CREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerId = (NEW.jsonb->>'ledgerId'); NEW.fromFiscalYearId = (NEW.jsonb->>'fromFiscalYearId'); NEW.toFiscalYearId = (NEW.jsonb->>'toFiscalYearId'); RETURN NEW; END; $$; XDROP FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references(); diku_mod_finance_storage folio_adminfalse12t125516745update_ledger_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_ledger_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fiscalYearOneId = (NEW.jsonb->>'fiscalYearOneId'); RETURN NEW; END; $$; CDROP FUNCTION diku_mod_finance_storage.update_ledger_references(); diku_mod_finance_storage folio_adminfalse121255170472update_temporary_invoice_transactions_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.sourceInvoiceId = (NEW.jsonb->>'sourceInvoiceId'); NEW.paymentEncumbranceId = (NEW.jsonb->>'paymentEncumbranceId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.toFundId = (NEW.jsonb->>'toFundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; [DROP FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references(); diku_mod_finance_storage folio_adminfalse121255169900update_temporary_order_transactions_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.encumbrance_sourcePurchaseOrderId = (NEW.jsonb->'encumbrance'->>'sourcePurchaseOrderId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; YDROP FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references(); diku_mod_finance_storage folio_adminfalse12|125516888update_transaction_references()FUNCTIONCREATE FUNCTION diku_mod_finance_storage.update_transaction_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.sourceFiscalYearId = (NEW.jsonb->>'sourceFiscalYearId'); NEW.toFundId = (NEW.jsonb->>'toFundId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; HDROP FUNCTION diku_mod_finance_storage.update_transaction_references(); diku_mod_finance_storage folio_adminfalse12c125516681upsert(text, uuid, anyelement)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.upsert(text, uuid, anyelement) RETURNS uuid LANGUAGE plpgsql AS $_$ DECLARE ret uuid; BEGIN EXECUTE format('UPDATE diku_mod_finance_storage.%I SET jsonb=$3 WHERE id=$2 RETURNING id', $1) USING $1, $2, $3 INTO ret; IF ret IS NOT NULL THEN RETURN ret; END IF; EXECUTE format('INSERT INTO diku_mod_finance_storage.%I (id, jsonb) VALUES ($2, $3) RETURNING id', $1) USING $1, $2, $3 INTO STRICT ret; RETURN ret; END; $_$; GDROP FUNCTION diku_mod_finance_storage.upsert(text, uuid, anyelement); diku_mod_finance_storage folio_adminfalse12Q125516674uuid_larger(uuid, uuid)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.uuid_larger(uuid, uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 > $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $_$; @DROP FUNCTION diku_mod_finance_storage.uuid_larger(uuid, uuid); diku_mod_finance_storage folio_adminfalse12P125516673uuid_smaller(uuid, uuid)FUNCTIONCREATE FUNCTION diku_mod_finance_storage.uuid_smaller(uuid, uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 < $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $_$; ADROP FUNCTION diku_mod_finance_storage.uuid_smaller(uuid, uuid); diku_mod_finance_storage folio_adminfalse12^125516676 max(uuid) AGGREGATECREATE AGGREGATE diku_mod_finance_storage.max(uuid) ( SFUNC = diku_mod_finance_storage.uuid_larger, STYPE = uuid, COMBINEFUNC = diku_mod_finance_storage.uuid_larger, SORTOP = OPERATOR(pg_catalog.>), PARALLEL = safe ); 3DROP AGGREGATE diku_mod_finance_storage.max(uuid); diku_mod_finance_storage folio_adminfalse1873187312_125516677 min(uuid) AGGREGATECREATE AGGREGATE diku_mod_finance_storage.min(uuid) ( SFUNC = diku_mod_finance_storage.uuid_smaller, STYPE = uuid, COMBINEFUNC = diku_mod_finance_storage.uuid_smaller, SORTOP = OPERATOR(pg_catalog.<), PARALLEL = safe ); 3DROP AGGREGATE diku_mod_finance_storage.min(uuid); diku_mod_finance_storage folio_adminfalse1218721872125916792budgetTABLECREATE TABLE diku_mod_finance_storage.budget ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fundid uuid, fiscalyearid uuid ); ,DROP TABLE diku_mod_finance_storage.budget; diku_mod_finance_storageheap folio_adminfalse12)00 TABLE budgetACLPGRANT ALL ON TABLE diku_mod_finance_storage.budget TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse261125916821budget_expense_classTABLECREATE TABLE diku_mod_finance_storage.budget_expense_class ( id uuid NOT NULL, jsonb jsonb NOT NULL, budgetid uuid, expenseclassid uuid ); :DROP TABLE diku_mod_finance_storage.budget_expense_class; diku_mod_finance_storageheap folio_adminfalse12)00TABLE budget_expense_classACL^GRANT ALL ON TABLE diku_mod_finance_storage.budget_expense_class TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse262125917135budget_financial_summary_viewVIEW* CREATE VIEW diku_mod_finance_storage.budget_financial_summary_view AS SELECT calc.id, (((((((calc.jsonb || jsonb_build_object('allocated', calc.allocated)) || jsonb_build_object('totalFunding', calc.totalfunding)) || jsonb_build_object('cashBalance', calc.cashbalance)) || jsonb_build_object('overEncumbrance', calc.overencumbrance)) || jsonb_build_object('overExpended', calc.overexpended)) || jsonb_build_object('available', calc.available)) || jsonb_build_object('unavailable', calc.unavailable)) AS jsonb, calc.fundid, calc.fiscalyearid, calc.creation_date FROM ( SELECT budget.id, budget.jsonb, budget.fundid, budget.fiscalyearid, al.allocated, tf.totalfunding, cb.cashbalance, oex.overexpended, oen.overencumbrance, av.available, un.unavailable, budget.creation_date FROM diku_mod_finance_storage.budget, LATERAL ( SELECT ((budget.jsonb ->> 'initialAllocation'::text))::numeric AS initialallocation) ia, LATERAL ( SELECT ((budget.jsonb ->> 'allocationTo'::text))::numeric AS allocationto) at, LATERAL ( SELECT ((budget.jsonb ->> 'allocationFrom'::text))::numeric AS allocationfrom) af, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'expenditures'::text))::numeric, (0)::numeric) AS expenditures) ex, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'awaitingPayment'::text))::numeric, (0)::numeric) AS awaitingpayment) ap, LATERAL ( SELECT ((budget.jsonb ->> 'encumbered'::text))::numeric AS encumbered) en, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'netTransfers'::text))::numeric, (0)::numeric) AS nettransfers) nt, LATERAL ( SELECT ((ia.initialallocation + at.allocationto) - af.allocationfrom) AS allocated) al, LATERAL ( SELECT (al.allocated + nt.nettransfers) AS totalfunding) tf, LATERAL ( SELECT (tf.totalfunding - ex.expenditures) AS cashbalance) cb, LATERAL ( SELECT GREATEST((en.encumbered - GREATEST((GREATEST((tf.totalfunding - ex.expenditures), (0)::numeric) - ap.awaitingpayment), (0)::numeric)), (0)::numeric) AS overencumbrance) oen, LATERAL ( SELECT GREATEST(((ap.awaitingpayment + ex.expenditures) - tf.totalfunding), (0)::numeric) AS overexpended) oex, LATERAL ( SELECT ((en.encumbered + ap.awaitingpayment) + ex.expenditures) AS unavailable) un, LATERAL ( SELECT GREATEST((tf.totalfunding - un.unavailable), (0)::numeric) AS available) av) calc; BDROP VIEW diku_mod_finance_storage.budget_financial_summary_view; diku_mod_finance_storage folio_adminfalse26126126126126112)00#TABLE budget_financial_summary_viewACLgGRANT ALL ON TABLE diku_mod_finance_storage.budget_financial_summary_view TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse274125916695 expense_classTABLEhCREATE TABLE diku_mod_finance_storage.expense_class ( id uuid NOT NULL, jsonb jsonb NOT NULL ); 3DROP TABLE diku_mod_finance_storage.expense_class; diku_mod_finance_storageheap folio_adminfalse12)00TABLE expense_classACLWGRANT ALL ON TABLE diku_mod_finance_storage.expense_class TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse256125916706 fiscal_yearTABLECREATE TABLE diku_mod_finance_storage.fiscal_year ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text ); 1DROP TABLE diku_mod_finance_storage.fiscal_year; diku_mod_finance_storageheap folio_adminfalse12)00TABLE fiscal_yearACLUGRANT ALL ON TABLE diku_mod_finance_storage.fiscal_year TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse257125916761fundTABLECREATE TABLE diku_mod_finance_storage.fund ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerid uuid, fundtypeid uuid ); *DROP TABLE diku_mod_finance_storage.fund; diku_mod_finance_storageheap folio_adminfalse12)00 TABLE fundACLNGRANT ALL ON TABLE diku_mod_finance_storage.fund TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse260125916751 fund_typeTABLEdCREATE TABLE diku_mod_finance_storage.fund_type ( id uuid NOT NULL, jsonb jsonb NOT NULL ); /DROP TABLE diku_mod_finance_storage.fund_type; diku_mod_finance_storageheap folio_adminfalse12)00TABLE fund_typeACLSGRANT ALL ON TABLE diku_mod_finance_storage.fund_type TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse259 125916911group_fund_fiscal_yearTABLECREATE TABLE diku_mod_finance_storage.group_fund_fiscal_year ( id uuid NOT NULL, jsonb jsonb NOT NULL, budgetid uuid, groupid uuid, fundid uuid, fiscalyearid uuid ); <DROP TABLE diku_mod_finance_storage.group_fund_fiscal_year; diku_mod_finance_storageheap folio_adminfalse12)00TABLE group_fund_fiscal_yearACL`GRANT ALL ON TABLE diku_mod_finance_storage.group_fund_fiscal_year TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse265125916894groupsTABLECREATE TABLE diku_mod_finance_storage.groups ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text ); ,DROP TABLE diku_mod_finance_storage.groups; diku_mod_finance_storageheap folio_adminfalse12)00 TABLE groupsACLPGRANT ALL ON TABLE diku_mod_finance_storage.groups TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse264125917130group_budgets_viewVIEWCREATE VIEW diku_mod_finance_storage.group_budgets_view AS SELECT budget.id, budget.jsonb, groups.jsonb AS group_jsonb FROM ((diku_mod_finance_storage.budget LEFT JOIN diku_mod_finance_storage.group_fund_fiscal_year ON ((budget.id = group_fund_fiscal_year.budgetid))) LEFT JOIN diku_mod_finance_storage.groups ON ((group_fund_fiscal_year.groupid = groups.id))); 7DROP VIEW diku_mod_finance_storage.group_budgets_view; diku_mod_finance_storage folio_adminfalse26126126426426526512)00TABLE group_budgets_viewACL\GRANT ALL ON TABLE diku_mod_finance_storage.group_budgets_view TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse273 125916992invoice_transaction_summariesTABLExCREATE TABLE diku_mod_finance_storage.invoice_transaction_summaries ( id uuid NOT NULL, jsonb jsonb NOT NULL ); CDROP TABLE diku_mod_finance_storage.invoice_transaction_summaries; diku_mod_finance_storageheap folio_adminfalse12)00#TABLE invoice_transaction_summariesACLgGRANT ALL ON TABLE diku_mod_finance_storage.invoice_transaction_summaries TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse268125916724ledgerTABLECREATE TABLE diku_mod_finance_storage.ledger ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fiscalyearoneid uuid ); ,DROP TABLE diku_mod_finance_storage.ledger; diku_mod_finance_storageheap folio_adminfalse12)00 TABLE ledgerACLPGRANT ALL ON TABLE diku_mod_finance_storage.ledger TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse258125917049ledger_fiscal_year_rolloverTABLECREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerid uuid, fromfiscalyearid uuid, tofiscalyearid uuid ); ADROP TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover; diku_mod_finance_storageheap folio_adminfalse12)00!TABLE ledger_fiscal_year_rolloverACLeGRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse270125917106!ledger_fiscal_year_rollover_errorTABLECREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerrolloverid uuid ); GDROP TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error; diku_mod_finance_storageheap folio_adminfalse12)00'TABLE ledger_fiscal_year_rollover_errorACLkGRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse272125917083$ledger_fiscal_year_rollover_progressTABLECREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerrolloverid uuid ); JDROP TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress; diku_mod_finance_storageheap folio_adminfalse12)00*TABLE ledger_fiscal_year_rollover_progressACLnGRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse271 125916947order_transaction_summariesTABLEvCREATE TABLE diku_mod_finance_storage.order_transaction_summaries ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ADROP TABLE diku_mod_finance_storage.order_transaction_summaries; diku_mod_finance_storageheap folio_adminfalse12)00!TABLE order_transaction_summariesACLeGRANT ALL ON TABLE diku_mod_finance_storage.order_transaction_summaries TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse266125916642 rmb_internalTABLEjCREATE TABLE diku_mod_finance_storage.rmb_internal ( id integer NOT NULL, jsonb jsonb NOT NULL ); 2DROP TABLE diku_mod_finance_storage.rmb_internal; diku_mod_finance_storageheap folio_adminfalse12)00TABLE rmb_internalACLVGRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse252125916667rmb_internal_analyzeTABLESCREATE TABLE diku_mod_finance_storage.rmb_internal_analyze ( tablename text ); :DROP TABLE diku_mod_finance_storage.rmb_internal_analyze; diku_mod_finance_storageheap folio_adminfalse12)00TABLE rmb_internal_analyzeACL^GRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal_analyze TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse255125916640rmb_internal_id_seqSEQUENCECREATE SEQUENCE diku_mod_finance_storage.rmb_internal_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; <DROP SEQUENCE diku_mod_finance_storage.rmb_internal_id_seq; diku_mod_finance_storage folio_adminfalse25212)00rmb_internal_id_seqSEQUENCE OWNED BYoALTER SEQUENCE diku_mod_finance_storage.rmb_internal_id_seq OWNED BY diku_mod_finance_storage.rmb_internal.id; diku_mod_finance_storage folio_adminfalse251125916659rmb_internal_indexTABLECREATE TABLE diku_mod_finance_storage.rmb_internal_index ( name text NOT NULL, def text NOT NULL, remove boolean NOT NULL ); 8DROP TABLE diku_mod_finance_storage.rmb_internal_index; diku_mod_finance_storageheap folio_adminfalse12)00TABLE rmb_internal_indexACL\GRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal_index TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse254125916651rmb_jobTABLEbCREATE TABLE diku_mod_finance_storage.rmb_job ( id uuid NOT NULL, jsonb jsonb NOT NULL ); -DROP TABLE diku_mod_finance_storage.rmb_job; diku_mod_finance_storageheap folio_adminfalse12)00 TABLE rmb_jobACLQGRANT ALL ON TABLE diku_mod_finance_storage.rmb_job TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse253 125917001temporary_invoice_transactionsTABLE CREATE TABLE diku_mod_finance_storage.temporary_invoice_transactions ( id uuid NOT NULL, jsonb jsonb NOT NULL, sourceinvoiceid uuid, paymentencumbranceid uuid, fromfundid uuid, tofundid uuid, fiscalyearid uuid, expenseclassid uuid ); DDROP TABLE diku_mod_finance_storage.temporary_invoice_transactions; diku_mod_finance_storageheap folio_adminfalse12)00$TABLE temporary_invoice_transactionsACLhGRANT ALL ON TABLE diku_mod_finance_storage.temporary_invoice_transactions TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse269 125916956temporary_order_transactionsTABLECREATE TABLE diku_mod_finance_storage.temporary_order_transactions ( id uuid NOT NULL, jsonb jsonb NOT NULL, encumbrance_sourcepurchaseorderid uuid, fiscalyearid uuid, fromfundid uuid, expenseclassid uuid ); BDROP TABLE diku_mod_finance_storage.temporary_order_transactions; diku_mod_finance_storageheap folio_adminfalse12)00"TABLE temporary_order_transactionsACLfGRANT ALL ON TABLE diku_mod_finance_storage.temporary_order_transactions TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse267125916845 transactionTABLECREATE TABLE diku_mod_finance_storage.transaction ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fiscalyearid uuid, fromfundid uuid, sourcefiscalyearid uuid, tofundid uuid, expenseclassid uuid ); 1DROP TABLE diku_mod_finance_storage.transaction; diku_mod_finance_storageheap folio_adminfalse12)00TABLE transactionACLUGRANT ALL ON TABLE diku_mod_finance_storage.transaction TO diku_mod_finance_storage; diku_mod_finance_storage folio_adminfalse263M(260416645rmb_internal idDEFAULTALTER TABLE ONLY diku_mod_finance_storage.rmb_internal ALTER COLUMN id SET DEFAULT nextval('diku_mod_finance_storage.rmb_internal_id_seq'::regclass); PALTER TABLE diku_mod_finance_storage.rmb_internal ALTER COLUMN id DROP DEFAULT; diku_mod_finance_storage folio_adminfalse251252252)016792budget TABLE DATAnCOPY diku_mod_finance_storage.budget (id, jsonb, creation_date, created_by, fundid, fiscalyearid) FROM stdin; diku_mod_finance_storage folio_adminfalse261 10653.dat)016821budget_expense_class TABLE DATAeCOPY diku_mod_finance_storage.budget_expense_class (id, jsonb, budgetid, expenseclassid) FROM stdin; diku_mod_finance_storage folio_adminfalse262 10654.dat)016695 expense_class TABLE DATADCOPY diku_mod_finance_storage.expense_class (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse256 10648.dat)016706 fiscal_year TABLE DATA]COPY diku_mod_finance_storage.fiscal_year (id, jsonb, creation_date, created_by) FROM stdin; diku_mod_finance_storage folio_adminfalse257 10649.dat)016761fund TABLE DATAlCOPY diku_mod_finance_storage.fund (id, jsonb, creation_date, created_by, ledgerid, fundtypeid) FROM stdin; diku_mod_finance_storage folio_adminfalse260 10652.dat)016751 fund_type TABLE DATA@COPY diku_mod_finance_storage.fund_type (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse259 10651.dat)016911group_fund_fiscal_year TABLE DATAvCOPY diku_mod_finance_storage.group_fund_fiscal_year (id, jsonb, budgetid, groupid, fundid, fiscalyearid) FROM stdin; diku_mod_finance_storage folio_adminfalse265 10657.dat)016894groups TABLE DATAXCOPY diku_mod_finance_storage.groups (id, jsonb, creation_date, created_by) FROM stdin; diku_mod_finance_storage folio_adminfalse264 10656.dat)016992invoice_transaction_summaries TABLE DATATCOPY diku_mod_finance_storage.invoice_transaction_summaries (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse268 10660.dat)016724ledger TABLE DATAiCOPY diku_mod_finance_storage.ledger (id, jsonb, creation_date, created_by, fiscalyearoneid) FROM stdin; diku_mod_finance_storage folio_adminfalse258 10650.dat)017049ledger_fiscal_year_rollover TABLE DATACOPY diku_mod_finance_storage.ledger_fiscal_year_rollover (id, jsonb, creation_date, created_by, ledgerid, fromfiscalyearid, tofiscalyearid) FROM stdin; diku_mod_finance_storage folio_adminfalse270 10662.dat)017106!ledger_fiscal_year_rollover_error TABLE DATACOPY diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM stdin; diku_mod_finance_storage folio_adminfalse272 10664.dat)017083$ledger_fiscal_year_rollover_progress TABLE DATACOPY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM stdin; diku_mod_finance_storage folio_adminfalse271 10663.dat)016947order_transaction_summaries TABLE DATARCOPY diku_mod_finance_storage.order_transaction_summaries (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse266 10658.dat)016642 rmb_internal TABLE DATACCOPY diku_mod_finance_storage.rmb_internal (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse252 10644.dat)016667rmb_internal_analyze TABLE DATAKCOPY diku_mod_finance_storage.rmb_internal_analyze (tablename) FROM stdin; diku_mod_finance_storage folio_adminfalse255 10647.dat)016659rmb_internal_index TABLE DATAQCOPY diku_mod_finance_storage.rmb_internal_index (name, def, remove) FROM stdin; diku_mod_finance_storage folio_adminfalse254 10646.dat)016651rmb_job TABLE DATA>COPY diku_mod_finance_storage.rmb_job (id, jsonb) FROM stdin; diku_mod_finance_storage folio_adminfalse253 10645.dat)017001temporary_invoice_transactions TABLE DATACOPY diku_mod_finance_storage.temporary_invoice_transactions (id, jsonb, sourceinvoiceid, paymentencumbranceid, fromfundid, tofundid, fiscalyearid, expenseclassid) FROM stdin; diku_mod_finance_storage folio_adminfalse269 10661.dat)016956temporary_order_transactions TABLE DATACOPY diku_mod_finance_storage.temporary_order_transactions (id, jsonb, encumbrance_sourcepurchaseorderid, fiscalyearid, fromfundid, expenseclassid) FROM stdin; diku_mod_finance_storage folio_adminfalse267 10659.dat)016845 transaction TABLE DATACOPY diku_mod_finance_storage.transaction (id, jsonb, creation_date, created_by, fiscalyearid, fromfundid, sourcefiscalyearid, tofundid, expenseclassid) FROM stdin; diku_mod_finance_storage folio_adminfalse263 10655.dat)00rmb_internal_id_seq SEQUENCE SETSSELECT pg_catalog.setval('diku_mod_finance_storage.rmb_internal_id_seq', 1, true); diku_mod_finance_storage folio_adminfalse251~(260616828.budget_expense_class budget_expense_class_pkey CONSTRAINT~ALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT budget_expense_class_pkey PRIMARY KEY (id); jALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class DROP CONSTRAINT budget_expense_class_pkey; diku_mod_finance_storage folio_adminfalse262y(260616799budget budget_pkey CONSTRAINTbALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT budget_pkey PRIMARY KEY (id); NALTER TABLE ONLY diku_mod_finance_storage.budget DROP CONSTRAINT budget_pkey; diku_mod_finance_storage folio_adminfalse261W(260616702 expense_class expense_class_pkey CONSTRAINTpALTER TABLE ONLY diku_mod_finance_storage.expense_class ADD CONSTRAINT expense_class_pkey PRIMARY KEY (id); \ALTER TABLE ONLY diku_mod_finance_storage.expense_class DROP CONSTRAINT expense_class_pkey; diku_mod_finance_storage folio_adminfalse256](260616713fiscal_year fiscal_year_pkey CONSTRAINTlALTER TABLE ONLY diku_mod_finance_storage.fiscal_year ADD CONSTRAINT fiscal_year_pkey PRIMARY KEY (id); XALTER TABLE ONLY diku_mod_finance_storage.fiscal_year DROP CONSTRAINT fiscal_year_pkey; diku_mod_finance_storage folio_adminfalse257r(260616768fund fund_pkey CONSTRAINT^ALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT fund_pkey PRIMARY KEY (id); JALTER TABLE ONLY diku_mod_finance_storage.fund DROP CONSTRAINT fund_pkey; diku_mod_finance_storage folio_adminfalse260j(260616758fund_type fund_type_pkey CONSTRAINThALTER TABLE ONLY diku_mod_finance_storage.fund_type ADD CONSTRAINT fund_type_pkey PRIMARY KEY (id); TALTER TABLE ONLY diku_mod_finance_storage.fund_type DROP CONSTRAINT fund_type_pkey; diku_mod_finance_storage folio_adminfalse259(2606169182group_fund_fiscal_year group_fund_fiscal_year_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT group_fund_fiscal_year_pkey PRIMARY KEY (id); nALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year DROP CONSTRAINT group_fund_fiscal_year_pkey; diku_mod_finance_storage folio_adminfalse265(260616901groups groups_pkey CONSTRAINTbALTER TABLE ONLY diku_mod_finance_storage.groups ADD CONSTRAINT groups_pkey PRIMARY KEY (id); NALTER TABLE ONLY diku_mod_finance_storage.groups DROP CONSTRAINT groups_pkey; diku_mod_finance_storage folio_adminfalse264(260616999@invoice_transaction_summaries invoice_transaction_summaries_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.invoice_transaction_summaries ADD CONSTRAINT invoice_transaction_summaries_pkey PRIMARY KEY (id); |ALTER TABLE ONLY diku_mod_finance_storage.invoice_transaction_summaries DROP CONSTRAINT invoice_transaction_summaries_pkey; diku_mod_finance_storage folio_adminfalse268(260617113Hledger_fiscal_year_rollover_error ledger_fiscal_year_rollover_error_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error ADD CONSTRAINT ledger_fiscal_year_rollover_error_pkey PRIMARY KEY (id); ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error DROP CONSTRAINT ledger_fiscal_year_rollover_error_pkey; diku_mod_finance_storage folio_adminfalse272(260617056<ledger_fiscal_year_rollover ledger_fiscal_year_rollover_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT ledger_fiscal_year_rollover_pkey PRIMARY KEY (id); xALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover DROP CONSTRAINT ledger_fiscal_year_rollover_pkey; diku_mod_finance_storage folio_adminfalse270(260617090Nledger_fiscal_year_rollover_progress ledger_fiscal_year_rollover_progress_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ADD CONSTRAINT ledger_fiscal_year_rollover_progress_pkey PRIMARY KEY (id); ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress DROP CONSTRAINT ledger_fiscal_year_rollover_progress_pkey; diku_mod_finance_storage folio_adminfalse271g(260616731ledger ledger_pkey CONSTRAINTbALTER TABLE ONLY diku_mod_finance_storage.ledger ADD CONSTRAINT ledger_pkey PRIMARY KEY (id); NALTER TABLE ONLY diku_mod_finance_storage.ledger DROP CONSTRAINT ledger_pkey; diku_mod_finance_storage folio_adminfalse258(260616954<order_transaction_summaries order_transaction_summaries_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.order_transaction_summaries ADD CONSTRAINT order_transaction_summaries_pkey PRIMARY KEY (id); xALTER TABLE ONLY diku_mod_finance_storage.order_transaction_summaries DROP CONSTRAINT order_transaction_summaries_pkey; diku_mod_finance_storage folio_adminfalse266S(260616666*rmb_internal_index rmb_internal_index_pkey CONSTRAINT|ALTER TABLE ONLY diku_mod_finance_storage.rmb_internal_index ADD CONSTRAINT rmb_internal_index_pkey PRIMARY KEY (name); fALTER TABLE ONLY diku_mod_finance_storage.rmb_internal_index DROP CONSTRAINT rmb_internal_index_pkey; diku_mod_finance_storage folio_adminfalse254O(260616650rmb_internal rmb_internal_pkey CONSTRAINTnALTER TABLE ONLY diku_mod_finance_storage.rmb_internal ADD CONSTRAINT rmb_internal_pkey PRIMARY KEY (id); ZALTER TABLE ONLY diku_mod_finance_storage.rmb_internal DROP CONSTRAINT rmb_internal_pkey; diku_mod_finance_storage folio_adminfalse252Q(260616658rmb_job rmb_job_pkey CONSTRAINTdALTER TABLE ONLY diku_mod_finance_storage.rmb_job ADD CONSTRAINT rmb_job_pkey PRIMARY KEY (id); PALTER TABLE ONLY diku_mod_finance_storage.rmb_job DROP CONSTRAINT rmb_job_pkey; diku_mod_finance_storage folio_adminfalse253(260617008Btemporary_invoice_transactions temporary_invoice_transactions_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT temporary_invoice_transactions_pkey PRIMARY KEY (id); ~ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT temporary_invoice_transactions_pkey; diku_mod_finance_storage folio_adminfalse269(260616963>temporary_order_transactions temporary_order_transactions_pkey CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT temporary_order_transactions_pkey PRIMARY KEY (id); zALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions DROP CONSTRAINT temporary_order_transactions_pkey; diku_mod_finance_storage folio_adminfalse267(260616852transaction transaction_pkey CONSTRAINTlALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT transaction_pkey PRIMARY KEY (id); XALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT transaction_pkey; diku_mod_finance_storage folio_adminfalse263s(125916802budget_budgetstatus_idx_ginINDEXCREATE INDEX budget_budgetstatus_idx_gin ON diku_mod_finance_storage.budget USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'budgetStatus'::text))) public.gin_trgm_ops); ADROP INDEX diku_mod_finance_storage.budget_budgetstatus_idx_gin; diku_mod_finance_storage folio_adminfalse2612611892z(1259168307budget_expense_class_budgetid_expenseclassid_idx_uniqueINDEX4CREATE UNIQUE INDEX budget_expense_class_budgetid_expenseclassid_idx_unique ON diku_mod_finance_storage.budget_expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'budgetId'::text), (jsonb ->> 'expenseClassId'::text)])))); ]DROP INDEX diku_mod_finance_storage.budget_expense_class_budgetid_expenseclassid_idx_unique; diku_mod_finance_storage folio_adminfalse26226218991892{(125916836!budget_expense_class_budgetid_idxINDEXxCREATE INDEX budget_expense_class_budgetid_idx ON diku_mod_finance_storage.budget_expense_class USING btree (budgetid); GDROP INDEX diku_mod_finance_storage.budget_expense_class_budgetid_idx; diku_mod_finance_storage folio_adminfalse262|(125916842'budget_expense_class_expenseclassid_idxINDEXCREATE INDEX budget_expense_class_expenseclassid_idx ON diku_mod_finance_storage.budget_expense_class USING btree (expenseclassid); MDROP INDEX diku_mod_finance_storage.budget_expense_class_expenseclassid_idx; diku_mod_finance_storage folio_adminfalse262t(125916814budget_fiscalyearid_idxINDEXdCREATE INDEX budget_fiscalyearid_idx ON diku_mod_finance_storage.budget USING btree (fiscalyearid); =DROP INDEX diku_mod_finance_storage.budget_fiscalyearid_idx; diku_mod_finance_storage folio_adminfalse261u(125916801%budget_fundid_fiscalyearid_idx_uniqueINDEXCREATE UNIQUE INDEX budget_fundid_fiscalyearid_idx_unique ON diku_mod_finance_storage.budget USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fiscalYearId'::text)))); KDROP INDEX diku_mod_finance_storage.budget_fundid_fiscalyearid_idx_unique; diku_mod_finance_storage folio_adminfalse2611892261v(125916808budget_fundid_idxINDEXXCREATE INDEX budget_fundid_idx ON diku_mod_finance_storage.budget USING btree (fundid); 7DROP INDEX diku_mod_finance_storage.budget_fundid_idx; diku_mod_finance_storage folio_adminfalse261w(125917134budget_name_idx_uniqueINDEXCREATE UNIQUE INDEX budget_name_idx_unique ON diku_mod_finance_storage.budget USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); <DROP INDEX diku_mod_finance_storage.budget_name_idx_unique; diku_mod_finance_storage folio_adminfalse2612611892T(125916705expense_class_code_idx_uniqueINDEXCREATE UNIQUE INDEX expense_class_code_idx_unique ON diku_mod_finance_storage.expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); CDROP INDEX diku_mod_finance_storage.expense_class_code_idx_unique; diku_mod_finance_storage folio_adminfalse2562561892U(125916704expense_class_name_idx_uniqueINDEXCREATE UNIQUE INDEX expense_class_name_idx_unique ON diku_mod_finance_storage.expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); CDROP INDEX diku_mod_finance_storage.expense_class_name_idx_unique; diku_mod_finance_storage folio_adminfalse2562561892X(125916718fiscal_year_acqunitids_idx_ginINDEXCREATE INDEX fiscal_year_acqunitids_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); DDROP INDEX diku_mod_finance_storage.fiscal_year_acqunitids_idx_gin; diku_mod_finance_storage folio_adminfalse2571892257Y(125916716fiscal_year_code_idx_uniqueINDEXCREATE UNIQUE INDEX fiscal_year_code_idx_unique ON diku_mod_finance_storage.fiscal_year USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); ADROP INDEX diku_mod_finance_storage.fiscal_year_code_idx_unique; diku_mod_finance_storage folio_adminfalse1892257257Z(125916717fiscal_year_name_idx_ginINDEXCREATE INDEX fiscal_year_name_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); >DROP INDEX diku_mod_finance_storage.fiscal_year_name_idx_gin; diku_mod_finance_storage folio_adminfalse2572571892[(125916715fiscal_year_periodend_idxINDEXCREATE INDEX fiscal_year_periodend_idx ON diku_mod_finance_storage.fiscal_year USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'periodEnd'::text))), 600)); ?DROP INDEX diku_mod_finance_storage.fiscal_year_periodend_idx; diku_mod_finance_storage folio_adminfalse2572571892^(125916719fiscal_year_series_idx_ginINDEXCREATE INDEX fiscal_year_series_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'series'::text))) public.gin_trgm_ops); @DROP INDEX diku_mod_finance_storage.fiscal_year_series_idx_gin; diku_mod_finance_storage folio_adminfalse1892257257k(125916772fund_acqunitids_idx_ginINDEXCREATE INDEX fund_acqunitids_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); =DROP INDEX diku_mod_finance_storage.fund_acqunitids_idx_gin; diku_mod_finance_storage folio_adminfalse1892260260l(125916770fund_code_idx_uniqueINDEXCREATE UNIQUE INDEX fund_code_idx_unique ON diku_mod_finance_storage.fund USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); :DROP INDEX diku_mod_finance_storage.fund_code_idx_unique; diku_mod_finance_storage folio_adminfalse2601892260m(125916773fund_fundstatus_idx_ginINDEXCREATE INDEX fund_fundstatus_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundStatus'::text))) public.gin_trgm_ops); =DROP INDEX diku_mod_finance_storage.fund_fundstatus_idx_gin; diku_mod_finance_storage folio_adminfalse2602601892n(125916785fund_fundtypeid_idxINDEX\CREATE INDEX fund_fundtypeid_idx ON diku_mod_finance_storage.fund USING btree (fundtypeid); 9DROP INDEX diku_mod_finance_storage.fund_fundtypeid_idx; diku_mod_finance_storage folio_adminfalse260o(125916779fund_ledgerid_idxINDEXXCREATE INDEX fund_ledgerid_idx ON diku_mod_finance_storage.fund USING btree (ledgerid); 7DROP INDEX diku_mod_finance_storage.fund_ledgerid_idx; diku_mod_finance_storage folio_adminfalse260p(125916771fund_name_idx_ginINDEXCREATE INDEX fund_name_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); 7DROP INDEX diku_mod_finance_storage.fund_name_idx_gin; diku_mod_finance_storage folio_adminfalse2601892260h(125916760fund_type_name_idx_uniqueINDEXCREATE UNIQUE INDEX fund_type_name_idx_unique ON diku_mod_finance_storage.fund_type USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); ?DROP INDEX diku_mod_finance_storage.fund_type_name_idx_unique; diku_mod_finance_storage folio_adminfalse2591892259(125916926#group_fund_fiscal_year_budgetid_idxINDEX|CREATE INDEX group_fund_fiscal_year_budgetid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (budgetid); IDROP INDEX diku_mod_finance_storage.group_fund_fiscal_year_budgetid_idx; diku_mod_finance_storage folio_adminfalse265(125916944'group_fund_fiscal_year_fiscalyearid_idxINDEXCREATE INDEX group_fund_fiscal_year_fiscalyearid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (fiscalyearid); MDROP INDEX diku_mod_finance_storage.group_fund_fiscal_year_fiscalyearid_idx; diku_mod_finance_storage folio_adminfalse265(125916938!group_fund_fiscal_year_fundid_idxINDEXxCREATE INDEX group_fund_fiscal_year_fundid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (fundid); GDROP INDEX diku_mod_finance_storage.group_fund_fiscal_year_fundid_idx; diku_mod_finance_storage folio_adminfalse265(125916920=group_fund_fiscal_year_groupid_fundid_fiscalyearid_idx_uniqueINDEXrCREATE UNIQUE INDEX group_fund_fiscal_year_groupid_fundid_fiscalyearid_idx_unique ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'groupId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fiscalYearId'::text)))); cDROP INDEX diku_mod_finance_storage.group_fund_fiscal_year_groupid_fundid_fiscalyearid_idx_unique; diku_mod_finance_storage folio_adminfalse2651892265(125916932"group_fund_fiscal_year_groupid_idxINDEXzCREATE INDEX group_fund_fiscal_year_groupid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (groupid); HDROP INDEX diku_mod_finance_storage.group_fund_fiscal_year_groupid_idx; diku_mod_finance_storage folio_adminfalse265(125916906groups_acqunitids_idx_ginINDEXCREATE INDEX groups_acqunitids_idx_gin ON diku_mod_finance_storage.groups USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); ?DROP INDEX diku_mod_finance_storage.groups_acqunitids_idx_gin; diku_mod_finance_storage folio_adminfalse1892264264(125916903groups_code_idx_uniqueINDEXCREATE UNIQUE INDEX groups_code_idx_unique ON diku_mod_finance_storage.groups USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); <DROP INDEX diku_mod_finance_storage.groups_code_idx_unique; diku_mod_finance_storage folio_adminfalse2641892264(125916904groups_name_idx_uniqueINDEXCREATE UNIQUE INDEX groups_name_idx_unique ON diku_mod_finance_storage.groups USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); <DROP INDEX diku_mod_finance_storage.groups_name_idx_unique; diku_mod_finance_storage folio_adminfalse2642641892(125916905groups_status_idx_ginINDEXCREATE INDEX groups_status_idx_gin ON diku_mod_finance_storage.groups USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'status'::text))) public.gin_trgm_ops); ;DROP INDEX diku_mod_finance_storage.groups_status_idx_gin; diku_mod_finance_storage folio_adminfalse2641892264_(125916738ledger_acqunitids_idx_ginINDEXCREATE INDEX ledger_acqunitids_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); ?DROP INDEX diku_mod_finance_storage.ledger_acqunitids_idx_gin; diku_mod_finance_storage folio_adminfalse2582581892`(125916737ledger_code_idx_ginINDEXCREATE INDEX ledger_code_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text))) public.gin_trgm_ops); 9DROP INDEX diku_mod_finance_storage.ledger_code_idx_gin; diku_mod_finance_storage folio_adminfalse2581892258a(125916735ledger_code_idx_uniqueINDEXCREATE UNIQUE INDEX ledger_code_idx_unique ON diku_mod_finance_storage.ledger USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); <DROP INDEX diku_mod_finance_storage.ledger_code_idx_unique; diku_mod_finance_storage folio_adminfalse2582581892(1259171164ledger_fiscal_year_rollover_error_details_fundid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_error_details_fundid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent(((jsonb -> 'details'::text) ->> 'fundId'::text))), 600)); ZDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_error_details_fundid_idx; diku_mod_finance_storage folio_adminfalse2721892272(125917115=ledger_fiscal_year_rollover_error_details_purchaseorderid_idxINDEX CREATE INDEX ledger_fiscal_year_rollover_error_details_purchaseorderid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent(((jsonb -> 'details'::text) ->> 'purchaseOrderId'::text))), 600)); cDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_error_details_purchaseorderid_idx; diku_mod_finance_storage folio_adminfalse1892272272(125917117/ledger_fiscal_year_rollover_error_errortype_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_error_errortype_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'errorType'::text))), 600)); UDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_error_errortype_idx; diku_mod_finance_storage folio_adminfalse1892272272(1259171236ledger_fiscal_year_rollover_error_ledgerrolloverid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_error_ledgerrolloverid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree (ledgerrolloverid); \DROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_error_ledgerrolloverid_idx; diku_mod_finance_storage folio_adminfalse272(1259170700ledger_fiscal_year_rollover_fromfiscalyearid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_fromfiscalyearid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (fromfiscalyearid); VDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_fromfiscalyearid_idx; diku_mod_finance_storage folio_adminfalse270(125917058?ledger_fiscal_year_rollover_ledgerid_fromfiscalyearid_idx_uniquINDEXECREATE UNIQUE INDEX ledger_fiscal_year_rollover_ledgerid_fromfiscalyearid_idx_uniqu ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'ledgerId'::text), (jsonb ->> 'fromFiscalYearId'::text)])))); eDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_ledgerid_fromfiscalyearid_idx_uniqu; diku_mod_finance_storage folio_adminfalse27018921899270(125917064(ledger_fiscal_year_rollover_ledgerid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_ledgerid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (ledgerid); NDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_ledgerid_idx; diku_mod_finance_storage folio_adminfalse270(1259170999ledger_fiscal_year_rollover_progress_ledgerrolloverid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree (ledgerrolloverid); _DROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx; diku_mod_finance_storage folio_adminfalse271(125917093?ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx_uniquINDEXCREATE UNIQUE INDEX ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx_uniqu ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'ledgerRolloverId'::text)))); eDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx_uniqu; diku_mod_finance_storage folio_adminfalse1892271271(125917092>ledger_fiscal_year_rollover_progress_overallrolloverstatus_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_progress_overallrolloverstatus_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'overallRolloverStatus'::text))), 600)); dDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_overallrolloverstatus_idx; diku_mod_finance_storage folio_adminfalse1892271271(125917076.ledger_fiscal_year_rollover_tofiscalyearid_idxINDEXCREATE INDEX ledger_fiscal_year_rollover_tofiscalyearid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (tofiscalyearid); TDROP INDEX diku_mod_finance_storage.ledger_fiscal_year_rollover_tofiscalyearid_idx; diku_mod_finance_storage folio_adminfalse270b(125916744ledger_fiscalyearoneid_idxINDEXjCREATE INDEX ledger_fiscalyearoneid_idx ON diku_mod_finance_storage.ledger USING btree (fiscalyearoneid); @DROP INDEX diku_mod_finance_storage.ledger_fiscalyearoneid_idx; diku_mod_finance_storage folio_adminfalse258c(125916733ledger_ledgerstatus_idxINDEXCREATE INDEX ledger_ledgerstatus_idx ON diku_mod_finance_storage.ledger USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'ledgerStatus'::text))), 600)); =DROP INDEX diku_mod_finance_storage.ledger_ledgerstatus_idx; diku_mod_finance_storage folio_adminfalse2581892258d(125916736ledger_name_idx_ginINDEXCREATE INDEX ledger_name_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); 9DROP INDEX diku_mod_finance_storage.ledger_name_idx_gin; diku_mod_finance_storage folio_adminfalse2581892258e(125916734ledger_name_idx_uniqueINDEXCREATE UNIQUE INDEX ledger_name_idx_unique ON diku_mod_finance_storage.ledger USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); <DROP INDEX diku_mod_finance_storage.ledger_name_idx_unique; diku_mod_finance_storage folio_adminfalse2582581892(1259170461temporary_invoice_transactions_expenseclassid_idxINDEXCREATE INDEX temporary_invoice_transactions_expenseclassid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (expenseclassid); WDROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_expenseclassid_idx; diku_mod_finance_storage folio_adminfalse269(125917040/temporary_invoice_transactions_fiscalyearid_idxINDEXCREATE INDEX temporary_invoice_transactions_fiscalyearid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (fiscalyearid); UDROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_fiscalyearid_idx; diku_mod_finance_storage folio_adminfalse269(125917028-temporary_invoice_transactions_fromfundid_idxINDEXCREATE INDEX temporary_invoice_transactions_fromfundid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (fromfundid); SDROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_fromfundid_idx; diku_mod_finance_storage folio_adminfalse269(1259170227temporary_invoice_transactions_paymentencumbranceid_idxINDEXCREATE INDEX temporary_invoice_transactions_paymentencumbranceid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (paymentencumbranceid); ]DROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_paymentencumbranceid_idx; diku_mod_finance_storage folio_adminfalse269(1259170162temporary_invoice_transactions_sourceinvoiceid_idxINDEXCREATE INDEX temporary_invoice_transactions_sourceinvoiceid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (sourceinvoiceid); XDROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_sourceinvoiceid_idx; diku_mod_finance_storage folio_adminfalse269(1259170109temporary_invoice_transactions_temp_invoice_tx_idx_uniqueINDEXCREATE UNIQUE INDEX temporary_invoice_transactions_temp_invoice_tx_idx_unique ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'amount'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fromFundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'sourceInvoiceId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'sourceInvoiceLineId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'toFundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'transactionType'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'expenseClassId'::text)))])); _DROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_temp_invoice_tx_idx_unique; diku_mod_finance_storage folio_adminfalse26926918921899(125917034+temporary_invoice_transactions_tofundid_idxINDEXCREATE INDEX temporary_invoice_transactions_tofundid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (tofundid); QDROP INDEX diku_mod_finance_storage.temporary_invoice_transactions_tofundid_idx; diku_mod_finance_storage folio_adminfalse269(125916971?temporary_order_transactions_encumbrance_sourcepurchaseorderid_INDEXCREATE INDEX temporary_order_transactions_encumbrance_sourcepurchaseorderid_ ON diku_mod_finance_storage.temporary_order_transactions USING btree (encumbrance_sourcepurchaseorderid); eDROP INDEX diku_mod_finance_storage.temporary_order_transactions_encumbrance_sourcepurchaseorderid_; diku_mod_finance_storage folio_adminfalse267(125916989/temporary_order_transactions_expenseclassid_idxINDEXCREATE INDEX temporary_order_transactions_expenseclassid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (expenseclassid); UDROP INDEX diku_mod_finance_storage.temporary_order_transactions_expenseclassid_idx; diku_mod_finance_storage folio_adminfalse267(125916977-temporary_order_transactions_fiscalyearid_idxINDEXCREATE INDEX temporary_order_transactions_fiscalyearid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (fiscalyearid); SDROP INDEX diku_mod_finance_storage.temporary_order_transactions_fiscalyearid_idx; diku_mod_finance_storage folio_adminfalse267(125916983+temporary_order_transactions_fromfundid_idxINDEXCREATE INDEX temporary_order_transactions_fromfundid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (fromfundid); QDROP INDEX diku_mod_finance_storage.temporary_order_transactions_fromfundid_idx; diku_mod_finance_storage folio_adminfalse267(1259169655temporary_order_transactions_temp_order_tx_idx_uniqueINDEXTCREATE UNIQUE INDEX temporary_order_transactions_temp_order_tx_idx_unique ON diku_mod_finance_storage.temporary_order_transactions USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePurchaseOrderId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePoLineId'::text), ((jsonb -> 'encumbrance'::text) ->> 'initialAmountEncumbered'::text), ((jsonb -> 'encumbrance'::text) ->> 'status'::text), (jsonb ->> 'expenseClassId'::text)])))); [DROP INDEX diku_mod_finance_storage.temporary_order_transactions_temp_order_tx_idx_unique; diku_mod_finance_storage folio_adminfalse26718992671892(125916857transaction_amount_idx_ginINDEXCREATE INDEX transaction_amount_idx_gin ON diku_mod_finance_storage.transaction USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'amount'::text))) public.gin_trgm_ops); @DROP INDEX diku_mod_finance_storage.transaction_amount_idx_gin; diku_mod_finance_storage folio_adminfalse1892263263(125916856transaction_credit_idx_uniqueINDEXCREATE UNIQUE INDEX transaction_credit_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'toFundId'::text), (jsonb ->> 'sourceInvoiceId'::text), (jsonb ->> 'sourceInvoiceLineId'::text), (jsonb ->> 'transactionType'::text), (jsonb ->> 'expenseClassId'::text)])))) WHERE ((jsonb ->> 'transactionType'::text) = 'Credit'::text); CDROP INDEX diku_mod_finance_storage.transaction_credit_idx_unique; diku_mod_finance_storage folio_adminfalse18992632632631892(125916854"transaction_encumbrance_idx_uniqueINDEXCREATE UNIQUE INDEX transaction_encumbrance_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePurchaseOrderId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePoLineId'::text), ((jsonb -> 'encumbrance'::text) ->> 'initialAmountEncumbered'::text), ((jsonb -> 'encumbrance'::text) ->> 'status'::text), (jsonb ->> 'expenseClassId'::text), (jsonb ->> 'fiscalYearId'::text)])))) WHERE ((jsonb ->> 'transactionType'::text) = 'Encumbrance'::text); HDROP INDEX diku_mod_finance_storage.transaction_encumbrance_idx_unique; diku_mod_finance_storage folio_adminfalse26326326318921899(125916887transaction_expenseclassid_idxINDEXrCREATE INDEX transaction_expenseclassid_idx ON diku_mod_finance_storage.transaction USING btree (expenseclassid); DDROP INDEX diku_mod_finance_storage.transaction_expenseclassid_idx; diku_mod_finance_storage folio_adminfalse263(125916863transaction_fiscalyearid_idxINDEXnCREATE INDEX transaction_fiscalyearid_idx ON diku_mod_finance_storage.transaction USING btree (fiscalyearid); BDROP INDEX diku_mod_finance_storage.transaction_fiscalyearid_idx; diku_mod_finance_storage folio_adminfalse263(125916869transaction_fromfundid_idxINDEXjCREATE INDEX transaction_fromfundid_idx ON diku_mod_finance_storage.transaction USING btree (fromfundid); @DROP INDEX diku_mod_finance_storage.transaction_fromfundid_idx; diku_mod_finance_storage folio_adminfalse263(125916855transaction_payment_idx_uniqueINDEX&CREATE UNIQUE INDEX transaction_payment_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), (jsonb ->> 'sourceInvoiceId'::text), (jsonb ->> 'sourceInvoiceLineId'::text), (jsonb ->> 'transactionType'::text), (jsonb ->> 'expenseClassId'::text)])))) WHERE (((jsonb ->> 'transactionType'::text) = 'Payment'::text) OR ((jsonb ->> 'transactionType'::text) = 'Pending payment'::text)); DDROP INDEX diku_mod_finance_storage.transaction_payment_idx_unique; diku_mod_finance_storage folio_adminfalse26326318921899263(125916875"transaction_sourcefiscalyearid_idxINDEXzCREATE INDEX transaction_sourcefiscalyearid_idx ON diku_mod_finance_storage.transaction USING btree (sourcefiscalyearid); HDROP INDEX diku_mod_finance_storage.transaction_sourcefiscalyearid_idx; diku_mod_finance_storage folio_adminfalse263(125916881transaction_tofundid_idxINDEXfCREATE INDEX transaction_tofundid_idx ON diku_mod_finance_storage.transaction USING btree (tofundid); >DROP INDEX diku_mod_finance_storage.transaction_tofundid_idx; diku_mod_finance_storage folio_adminfalse263(262016820!budget set_budget_md_json_triggerTRIGGERCREATE TRIGGER set_budget_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_budget_md_json(); LDROP TRIGGER set_budget_md_json_trigger ON diku_mod_finance_storage.budget; diku_mod_finance_storage folio_adminfalse2611869(262016818budget set_budget_md_triggerTRIGGERCREATE TRIGGER set_budget_md_trigger BEFORE INSERT ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.budget_set_md(); GDROP TRIGGER set_budget_md_trigger ON diku_mod_finance_storage.budget; diku_mod_finance_storage folio_adminfalse2611915(262016723+fiscal_year set_fiscal_year_md_json_triggerTRIGGERCREATE TRIGGER set_fiscal_year_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json(); VDROP TRIGGER set_fiscal_year_md_json_trigger ON diku_mod_finance_storage.fiscal_year; diku_mod_finance_storage folio_adminfalse2571907(262016721&fiscal_year set_fiscal_year_md_triggerTRIGGERCREATE TRIGGER set_fiscal_year_md_trigger BEFORE INSERT ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.fiscal_year_set_md(); QDROP TRIGGER set_fiscal_year_md_trigger ON diku_mod_finance_storage.fiscal_year; diku_mod_finance_storage folio_adminfalse2571906(262016791fund set_fund_md_json_triggerTRIGGERCREATE TRIGGER set_fund_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_fund_md_json(); HDROP TRIGGER set_fund_md_json_trigger ON diku_mod_finance_storage.fund; diku_mod_finance_storage folio_adminfalse1913260(262016789fund set_fund_md_triggerTRIGGERCREATE TRIGGER set_fund_md_trigger BEFORE INSERT ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.fund_set_md(); CDROP TRIGGER set_fund_md_trigger ON diku_mod_finance_storage.fund; diku_mod_finance_storage folio_adminfalse1912260(262016910!groups set_groups_md_json_triggerTRIGGERCREATE TRIGGER set_groups_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_groups_md_json(); LDROP TRIGGER set_groups_md_json_trigger ON diku_mod_finance_storage.groups; diku_mod_finance_storage folio_adminfalse1920264(262016908groups set_groups_md_triggerTRIGGERCREATE TRIGGER set_groups_md_trigger BEFORE INSERT ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.groups_set_md(); GDROP TRIGGER set_groups_md_trigger ON diku_mod_finance_storage.groups; diku_mod_finance_storage folio_adminfalse1919264(262016800budget set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); ADROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.budget; diku_mod_finance_storage folio_adminfalse1898261(262016829$budget_expense_class set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget_expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); ODROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.budget_expense_class; diku_mod_finance_storage folio_adminfalse2621898(262016703expense_class set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); HDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.expense_class; diku_mod_finance_storage folio_adminfalse2561898(262016714fiscal_year set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); FDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.fiscal_year; diku_mod_finance_storage folio_adminfalse2571898(262016769fund set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); ?DROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.fund; diku_mod_finance_storage folio_adminfalse1898260(262016759fund_type set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund_type FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); DDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.fund_type; diku_mod_finance_storage folio_adminfalse2591898(262016919&group_fund_fiscal_year set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.group_fund_fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); QDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.group_fund_fiscal_year; diku_mod_finance_storage folio_adminfalse2651898(262016902groups set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); ADROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.groups; diku_mod_finance_storage folio_adminfalse1898264(262017000-invoice_transaction_summaries set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.invoice_transaction_summaries FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); XDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.invoice_transaction_summaries; diku_mod_finance_storage folio_adminfalse2681898(262016732ledger set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); ADROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.ledger; diku_mod_finance_storage folio_adminfalse1898258(262017057+ledger_fiscal_year_rollover set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); VDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.ledger_fiscal_year_rollover; diku_mod_finance_storage folio_adminfalse2701898)2620171141ledger_fiscal_year_rollover_error set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); \DROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error; diku_mod_finance_storage folio_adminfalse1898272)2620170914ledger_fiscal_year_rollover_progress set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); _DROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress; diku_mod_finance_storage folio_adminfalse2711898(262016955+order_transaction_summaries set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.order_transaction_summaries FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); VDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.order_transaction_summaries; diku_mod_finance_storage folio_adminfalse2661898(262017009.temporary_invoice_transactions set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_invoice_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); YDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.temporary_invoice_transactions; diku_mod_finance_storage folio_adminfalse2691898(262016964,temporary_order_transactions set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_order_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); WDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.temporary_order_transactions; diku_mod_finance_storage folio_adminfalse2671898(262016853transaction set_id_in_jsonbTRIGGERCREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); FDROP TRIGGER set_id_in_jsonb ON diku_mod_finance_storage.transaction; diku_mod_finance_storage folio_adminfalse1898263)262017129Wledger_fiscal_year_rollover_error set_ledger_fiscal_year_rollover_error_md_json_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_error_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json(); DROP TRIGGER set_ledger_fiscal_year_rollover_error_md_json_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error; diku_mod_finance_storage folio_adminfalse1932272)262017127Rledger_fiscal_year_rollover_error set_ledger_fiscal_year_rollover_error_md_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_error_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md(); }DROP TRIGGER set_ledger_fiscal_year_rollover_error_md_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error; diku_mod_finance_storage folio_adminfalse1931272(262017082Kledger_fiscal_year_rollover set_ledger_fiscal_year_rollover_md_json_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json(); vDROP TRIGGER set_ledger_fiscal_year_rollover_md_json_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover; diku_mod_finance_storage folio_adminfalse1926270(262017080Fledger_fiscal_year_rollover set_ledger_fiscal_year_rollover_md_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md(); qDROP TRIGGER set_ledger_fiscal_year_rollover_md_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover; diku_mod_finance_storage folio_adminfalse1925270)262017105]ledger_fiscal_year_rollover_progress set_ledger_fiscal_year_rollover_progress_md_json_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_progress_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json(); DROP TRIGGER set_ledger_fiscal_year_rollover_progress_md_json_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress; diku_mod_finance_storage folio_adminfalse1929271)262017103Xledger_fiscal_year_rollover_progress set_ledger_fiscal_year_rollover_progress_md_triggerTRIGGERCREATE TRIGGER set_ledger_fiscal_year_rollover_progress_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md(); DROP TRIGGER set_ledger_fiscal_year_rollover_progress_md_trigger ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress; diku_mod_finance_storage folio_adminfalse1928271(262016750!ledger set_ledger_md_json_triggerTRIGGERCREATE TRIGGER set_ledger_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_md_json(); LDROP TRIGGER set_ledger_md_json_trigger ON diku_mod_finance_storage.ledger; diku_mod_finance_storage folio_adminfalse2581910(262016748ledger set_ledger_md_triggerTRIGGERCREATE TRIGGER set_ledger_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_set_md(); GDROP TRIGGER set_ledger_md_trigger ON diku_mod_finance_storage.ledger; diku_mod_finance_storage folio_adminfalse2581909(262016893+transaction set_transaction_md_json_triggerTRIGGERCREATE TRIGGER set_transaction_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_transaction_md_json(); VDROP TRIGGER set_transaction_md_json_trigger ON diku_mod_finance_storage.transaction; diku_mod_finance_storage folio_adminfalse1918263(262016891&transaction set_transaction_md_triggerTRIGGERCREATE TRIGGER set_transaction_md_trigger BEFORE INSERT ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.transaction_set_md(); QDROP TRIGGER set_transaction_md_trigger ON diku_mod_finance_storage.transaction; diku_mod_finance_storage folio_adminfalse1917263(262016844;budget_expense_class update_budget_expense_class_referencesTRIGGERCREATE TRIGGER update_budget_expense_class_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget_expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_budget_expense_class_references(); fDROP TRIGGER update_budget_expense_class_references ON diku_mod_finance_storage.budget_expense_class; diku_mod_finance_storage folio_adminfalse2621870(262016816budget update_budget_referencesTRIGGERCREATE TRIGGER update_budget_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_budget_references(); JDROP TRIGGER update_budget_references ON diku_mod_finance_storage.budget; diku_mod_finance_storage folio_adminfalse2611914(262016787fund update_fund_referencesTRIGGERCREATE TRIGGER update_fund_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_fund_references(); FDROP TRIGGER update_fund_references ON diku_mod_finance_storage.fund; diku_mod_finance_storage folio_adminfalse2601911(262016946?group_fund_fiscal_year update_group_fund_fiscal_year_referencesTRIGGERCREATE TRIGGER update_group_fund_fiscal_year_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.group_fund_fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references(); jDROP TRIGGER update_group_fund_fiscal_year_references ON diku_mod_finance_storage.group_fund_fiscal_year; diku_mod_finance_storage folio_adminfalse1921265)262017125Uledger_fiscal_year_rollover_error update_ledger_fiscal_year_rollover_error_referencesTRIGGERCREATE TRIGGER update_ledger_fiscal_year_rollover_error_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references(); DROP TRIGGER update_ledger_fiscal_year_rollover_error_references ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error; diku_mod_finance_storage folio_adminfalse1930272)262017101[ledger_fiscal_year_rollover_progress update_ledger_fiscal_year_rollover_progress_referencesTRIGGERCREATE TRIGGER update_ledger_fiscal_year_rollover_progress_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references(); DROP TRIGGER update_ledger_fiscal_year_rollover_progress_references ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress; diku_mod_finance_storage folio_adminfalse1927271)262017078Iledger_fiscal_year_rollover update_ledger_fiscal_year_rollover_referencesTRIGGERCREATE TRIGGER update_ledger_fiscal_year_rollover_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references(); tDROP TRIGGER update_ledger_fiscal_year_rollover_references ON diku_mod_finance_storage.ledger_fiscal_year_rollover; diku_mod_finance_storage folio_adminfalse2701924(262016746ledger update_ledger_referencesTRIGGERCREATE TRIGGER update_ledger_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_references(); JDROP TRIGGER update_ledger_references ON diku_mod_finance_storage.ledger; diku_mod_finance_storage folio_adminfalse2581908(262017048Otemporary_invoice_transactions update_temporary_invoice_transactions_referencesTRIGGERCREATE TRIGGER update_temporary_invoice_transactions_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_invoice_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references(); zDROP TRIGGER update_temporary_invoice_transactions_references ON diku_mod_finance_storage.temporary_invoice_transactions; diku_mod_finance_storage folio_adminfalse1923269(262016991Ktemporary_order_transactions update_temporary_order_transactions_referencesTRIGGERCREATE TRIGGER update_temporary_order_transactions_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_order_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references(); vDROP TRIGGER update_temporary_order_transactions_references ON diku_mod_finance_storage.temporary_order_transactions; diku_mod_finance_storage folio_adminfalse2671922(262016889)transaction update_transaction_referencesTRIGGERCREATE TRIGGER update_transaction_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_transaction_references(); TDROP TRIGGER update_transaction_references ON diku_mod_finance_storage.transaction; diku_mod_finance_storage folio_adminfalse1916263(260616831)budget_expense_class budgetid_budget_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT budgetid_budget_fkey FOREIGN KEY (budgetid) REFERENCES diku_mod_finance_storage.budget(id); eALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class DROP CONSTRAINT budgetid_budget_fkey; diku_mod_finance_storage folio_adminfalse26126210361(260616921+group_fund_fiscal_year budgetid_budget_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT budgetid_budget_fkey FOREIGN KEY (budgetid) REFERENCES diku_mod_finance_storage.budget(id); gALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year DROP CONSTRAINT budgetid_budget_fkey; diku_mod_finance_storage folio_adminfalse10361261265(260616966\temporary_order_transactions encumbrance_sourcepurchaseorderid_order_transaction_summaries_f FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT encumbrance_sourcepurchaseorderid_order_transaction_summaries_f FOREIGN KEY (encumbrance_sourcepurchaseorderid) REFERENCES diku_mod_finance_storage.order_transaction_summaries(id); ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions DROP CONSTRAINT encumbrance_sourcepurchaseorderid_order_transaction_summaries_f; diku_mod_finance_storage folio_adminfalse26726610392(2606168376budget_expense_class expenseclassid_expense_class_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); rALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class DROP CONSTRAINT expenseclassid_expense_class_fkey; diku_mod_finance_storage folio_adminfalse10327262256(260616882-transaction expenseclassid_expense_class_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); iALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT expenseclassid_expense_class_fkey; diku_mod_finance_storage folio_adminfalse10327256263(260616984>temporary_order_transactions expenseclassid_expense_class_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); zALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions DROP CONSTRAINT expenseclassid_expense_class_fkey; diku_mod_finance_storage folio_adminfalse25626710327(260617041@temporary_invoice_transactions expenseclassid_expense_class_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); |ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT expenseclassid_expense_class_fkey; diku_mod_finance_storage folio_adminfalse25626910327(260616809$budget fiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); `ALTER TABLE ONLY diku_mod_finance_storage.budget DROP CONSTRAINT fiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse10333261257(260616858)transaction fiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); eALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT fiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse10333257263(2606169394group_fund_fiscal_year fiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); pALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year DROP CONSTRAINT fiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse10333265257(260616972:temporary_order_transactions fiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); vALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions DROP CONSTRAINT fiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse26725710333(260617035<temporary_invoice_transactions fiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); xALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT fiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse25726910333(260616739'ledger fiscalyearoneid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger ADD CONSTRAINT fiscalyearoneid_fiscal_year_fkey FOREIGN KEY (fiscalyearoneid) REFERENCES diku_mod_finance_storage.fiscal_year(id); cALTER TABLE ONLY diku_mod_finance_storage.ledger DROP CONSTRAINT fiscalyearoneid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse10333258257(260617065=ledger_fiscal_year_rollover fromfiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT fromfiscalyearid_fiscal_year_fkey FOREIGN KEY (fromfiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); yALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover DROP CONSTRAINT fromfiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse25727010333(260616864 transaction fromfundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); \ALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT fromfundid_fund_fkey; diku_mod_finance_storage folio_adminfalse26010354263(2606169781temporary_order_transactions fromfundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); mALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions DROP CONSTRAINT fromfundid_fund_fkey; diku_mod_finance_storage folio_adminfalse26710354260(2606170233temporary_invoice_transactions fromfundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); oALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT fromfundid_fund_fkey; diku_mod_finance_storage folio_adminfalse26010354269(260616803budget fundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT fundid_fund_fkey FOREIGN KEY (fundid) REFERENCES diku_mod_finance_storage.fund(id); SALTER TABLE ONLY diku_mod_finance_storage.budget DROP CONSTRAINT fundid_fund_fkey; diku_mod_finance_storage folio_adminfalse10354261260(260616933'group_fund_fiscal_year fundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT fundid_fund_fkey FOREIGN KEY (fundid) REFERENCES diku_mod_finance_storage.fund(id); cALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year DROP CONSTRAINT fundid_fund_fkey; diku_mod_finance_storage folio_adminfalse26010354265(260616780fund fundtypeid_fund_type_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT fundtypeid_fund_type_fkey FOREIGN KEY (fundtypeid) REFERENCES diku_mod_finance_storage.fund_type(id); ZALTER TABLE ONLY diku_mod_finance_storage.fund DROP CONSTRAINT fundtypeid_fund_type_fkey; diku_mod_finance_storage folio_adminfalse10346260259(260616927*group_fund_fiscal_year groupid_groups_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT groupid_groups_fkey FOREIGN KEY (groupid) REFERENCES diku_mod_finance_storage.groups(id); fALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year DROP CONSTRAINT groupid_groups_fkey; diku_mod_finance_storage folio_adminfalse26526410382(260616774fund ledgerid_ledger_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT ledgerid_ledger_fkey FOREIGN KEY (ledgerid) REFERENCES diku_mod_finance_storage.ledger(id); UALTER TABLE ONLY diku_mod_finance_storage.fund DROP CONSTRAINT ledgerid_ledger_fkey; diku_mod_finance_storage folio_adminfalse25810343260(2606170590ledger_fiscal_year_rollover ledgerid_ledger_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT ledgerid_ledger_fkey FOREIGN KEY (ledgerid) REFERENCES diku_mod_finance_storage.ledger(id); lALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover DROP CONSTRAINT ledgerid_ledger_fkey; diku_mod_finance_storage folio_adminfalse10343258270(260617094Vledger_fiscal_year_rollover_progress ledgerrolloverid_ledger_fiscal_year_rollover_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ADD CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey FOREIGN KEY (ledgerrolloverid) REFERENCES diku_mod_finance_storage.ledger_fiscal_year_rollover(id); ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress DROP CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey; diku_mod_finance_storage folio_adminfalse27010415271(260617118Sledger_fiscal_year_rollover_error ledgerrolloverid_ledger_fiscal_year_rollover_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error ADD CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey FOREIGN KEY (ledgerrolloverid) REFERENCES diku_mod_finance_storage.ledger_fiscal_year_rollover(id); ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error DROP CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey; diku_mod_finance_storage folio_adminfalse27027210415(260617017Dtemporary_invoice_transactions paymentencumbranceid_transaction_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT paymentencumbranceid_transaction_fkey FOREIGN KEY (paymentencumbranceid) REFERENCES diku_mod_finance_storage.transaction(id); ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT paymentencumbranceid_transaction_fkey; diku_mod_finance_storage folio_adminfalse10375263269(260616870/transaction sourcefiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT sourcefiscalyearid_fiscal_year_fkey FOREIGN KEY (sourcefiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); kALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT sourcefiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse25726310333(260617011Qtemporary_invoice_transactions sourceinvoiceid_invoice_transaction_summaries_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT sourceinvoiceid_invoice_transaction_summaries_fkey FOREIGN KEY (sourceinvoiceid) REFERENCES diku_mod_finance_storage.invoice_transaction_summaries(id); ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT sourceinvoiceid_invoice_transaction_summaries_fkey; diku_mod_finance_storage folio_adminfalse10401268269(260617071;ledger_fiscal_year_rollover tofiscalyearid_fiscal_year_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT tofiscalyearid_fiscal_year_fkey FOREIGN KEY (tofiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); wALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover DROP CONSTRAINT tofiscalyearid_fiscal_year_fkey; diku_mod_finance_storage folio_adminfalse25727010333(260616876transaction tofundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT tofundid_fund_fkey FOREIGN KEY (tofundid) REFERENCES diku_mod_finance_storage.fund(id); ZALTER TABLE ONLY diku_mod_finance_storage.transaction DROP CONSTRAINT tofundid_fund_fkey; diku_mod_finance_storage folio_adminfalse10354263260(2606170291temporary_invoice_transactions tofundid_fund_fkey FK CONSTRAINTALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT tofundid_fund_fkey FOREIGN KEY (tofundid) REFERENCES diku_mod_finance_storage.fund(id); mALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions DROP CONSTRAINT tofundid_fund_fkey; diku_mod_finance_storage folio_adminfalse2601035426910653.dat0000600 0004000 0002000 00000034402 14125567623 0014346 0ustar00postgrespostgres0000000 0000000 d5e1df1e-3c55-42b9-bd22-82ff3157e29f {"id": "d5e1df1e-3c55-42b9-bd22-82ff3157e29f", "name": "ONE-TIME-SWEEP-FY2020", "fundId": "cf23adf0-61ba-4887-bf82-956c4aae2260", "metadata": {"createdDate": "2021-09-28T02:45:13.481", "updatedDate": "2021-09-28T02:45:13.481+00:00"}, "allocated": 0.0, "available": 0.0, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Frozen", "expenditures": 0.0, "fiscalYearId": "78110b4e-2f8e-4eef-81ee-3058c0c7a9ee", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "overEncumbrance": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.481 \N cf23adf0-61ba-4887-bf82-956c4aae2260 78110b4e-2f8e-4eef-81ee-3058c0c7a9ee eb3c3a49-0c6d-423d-bf60-ac6ad2f96221 {"id": "eb3c3a49-0c6d-423d-bf60-ac6ad2f96221", "name": "EXCH-SUBN-FY2021", "fundId": "d6f7c1ba-a237-465e-94ed-f37e91bc64bd", "metadata": {"createdDate": "2021-09-28T02:45:13.849", "updatedDate": "2021-09-28T02:45:15.709+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 50000.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.849 \N d6f7c1ba-a237-465e-94ed-f37e91bc64bd 684b5dc5-92f6-4db7-b996-b549d88f5e4e 4eadbf22-e6dc-4ea4-9453-c6e9de2cb5a8 {"id": "4eadbf22-e6dc-4ea4-9453-c6e9de2cb5a8", "name": "MIDEASTHIS-FY2021", "fundId": "30fcc8e7-a019-43f4-b642-2edc389f4501", "metadata": {"createdDate": "2021-09-28T02:45:13.593", "updatedDate": "2021-09-28T02:45:15.785+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 24000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.593 \N 30fcc8e7-a019-43f4-b642-2edc389f4501 684b5dc5-92f6-4db7-b996-b549d88f5e4e f6aea7f1-e614-4010-a2f7-913bb63d1561 {"id": "f6aea7f1-e614-4010-a2f7-913bb63d1561", "name": "HIST-FY2021", "fundId": "fb7b70f1-b898-4924-a991-0e4b6312bb5f", "metadata": {"createdDate": "2021-09-28T02:45:13.443", "updatedDate": "2021-09-28T02:45:15.871+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 200000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.443 \N fb7b70f1-b898-4924-a991-0e4b6312bb5f 684b5dc5-92f6-4db7-b996-b549d88f5e4e 400afc07-4aa6-4dbb-8f2c-40cf8e69b0e6 {"id": "400afc07-4aa6-4dbb-8f2c-40cf8e69b0e6", "name": "GIFT-SUBN-FY2021", "fundId": "e9f9bc2f-bad5-4613-9d6c-f55efa5805e7", "metadata": {"createdDate": "2021-09-28T02:45:13.721", "updatedDate": "2021-09-28T02:45:15.993+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 25000.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.721 \N e9f9bc2f-bad5-4613-9d6c-f55efa5805e7 684b5dc5-92f6-4db7-b996-b549d88f5e4e 5255e36f-4444-49d5-baa3-38f7f687f69d {"id": "5255e36f-4444-49d5-baa3-38f7f687f69d", "name": "USHIST-FY2021", "fundId": "65032151-39a5-4cef-8810-5350eb316300", "metadata": {"createdDate": "2021-09-28T02:45:13.79", "updatedDate": "2021-09-28T02:45:16.062+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 30000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.79 \N 65032151-39a5-4cef-8810-5350eb316300 684b5dc5-92f6-4db7-b996-b549d88f5e4e 4207567e-73c9-45c8-8850-8458389ae0ed {"id": "4207567e-73c9-45c8-8850-8458389ae0ed", "name": "MISCHIST-FY2021", "fundId": "a89eccf0-57a6-495e-898d-32b9b2210f2f", "metadata": {"createdDate": "2021-09-28T02:45:13.352", "updatedDate": "2021-09-28T02:45:16.119+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 35000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.352 \N a89eccf0-57a6-495e-898d-32b9b2210f2f 684b5dc5-92f6-4db7-b996-b549d88f5e4e 735fdf73-592b-4967-85ef-e8b82d09382c {"id": "735fdf73-592b-4967-85ef-e8b82d09382c", "name": "UNIV-SUBN-FY2021", "fundId": "4428a37c-8bae-4f0d-865d-970d83d5ad55", "metadata": {"createdDate": "2021-09-28T02:45:13.528", "updatedDate": "2021-09-28T02:45:16.203+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 400000.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.528 \N 4428a37c-8bae-4f0d-865d-970d83d5ad55 684b5dc5-92f6-4db7-b996-b549d88f5e4e d71635df-c08c-49cc-9082-197a30fd0392 {"id": "d71635df-c08c-49cc-9082-197a30fd0392", "name": "AFRICAHIST-FY2021", "fundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "metadata": {"createdDate": "2021-09-28T02:45:13.389", "updatedDate": "2021-09-28T02:45:15.973+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": -2500.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 21000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.389 \N 7fbd5d84-62d1-44c6-9c45-6cb173998bbd 684b5dc5-92f6-4db7-b996-b549d88f5e4e 0bfc8ba0-b61f-4852-bc5b-1f63ec039550 {"id": "0bfc8ba0-b61f-4852-bc5b-1f63ec039550", "name": "GRANT-SUBN-FY2020", "fundId": "1b6d3338-186e-4e35-9e75-1b886b0da53e", "metadata": {"createdDate": "2021-09-28T02:45:13.89", "updatedDate": "2021-09-28T02:45:13.890+00:00"}, "allocated": 0.0, "available": 0.0, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "78110b4e-2f8e-4eef-81ee-3058c0c7a9ee", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "overEncumbrance": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.89 \N 1b6d3338-186e-4e35-9e75-1b886b0da53e 78110b4e-2f8e-4eef-81ee-3058c0c7a9ee 0916fde2-7a7d-4ff0-9069-37ee1ec0c068 {"id": "0916fde2-7a7d-4ff0-9069-37ee1ec0c068", "name": "STATE-MONOSER-FY2019", "fundId": "bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0", "metadata": {"createdDate": "2021-09-28T02:45:13.939", "updatedDate": "2021-09-28T02:45:13.939+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "8da275b8-e099-49a1-9a31-b8241ff26ffc", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.939 \N bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0 8da275b8-e099-49a1-9a31-b8241ff26ffc 64a71a11-9143-4ebe-ac3a-b0ced57636ba {"id": "64a71a11-9143-4ebe-ac3a-b0ced57636ba", "name": "STATE-SUBN-FY2019", "fundId": "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6", "metadata": {"createdDate": "2021-09-28T02:45:14.087", "updatedDate": "2021-09-28T02:45:14.087+00:00"}, "allocated": 0.0, "available": 0.0, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "8da275b8-e099-49a1-9a31-b8241ff26ffc", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.087 \N e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6 8da275b8-e099-49a1-9a31-b8241ff26ffc a7c63802-4c1a-4646-9392-024e08df9c02 {"id": "a7c63802-4c1a-4646-9392-024e08df9c02", "name": "SLAVHIST-FY2019", "fundId": "f31a36de-fcf8-44f9-87ef-a55d06ad21ae", "metadata": {"createdDate": "2021-09-28T02:45:14.268", "updatedDate": "2021-09-28T02:45:14.268+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "8da275b8-e099-49a1-9a31-b8241ff26ffc", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.268 \N f31a36de-fcf8-44f9-87ef-a55d06ad21ae 8da275b8-e099-49a1-9a31-b8241ff26ffc 53c28e77-4623-4af7-ad3d-60a9ba470c45 {"id": "53c28e77-4623-4af7-ad3d-60a9ba470c45", "name": "LATAMHIST-FY2021", "fundId": "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79", "metadata": {"createdDate": "2021-09-28T02:45:14.159", "updatedDate": "2021-09-28T02:45:15.645+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 12000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.159 \N e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79 684b5dc5-92f6-4db7-b996-b549d88f5e4e de6761f6-1f64-4b5d-a5bc-98862c498c21 {"id": "de6761f6-1f64-4b5d-a5bc-98862c498c21", "name": "ASIAHIST-FY2021", "fundId": "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "metadata": {"createdDate": "2021-09-28T02:45:14.054", "updatedDate": "2021-09-28T02:45:15.742+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 23000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.054 \N 55f48dc6-efa7-4cfe-bc7c-4786efe493e3 684b5dc5-92f6-4db7-b996-b549d88f5e4e 34fe0c8b-2b99-4fe2-81a5-4ed6872a32e6 {"id": "34fe0c8b-2b99-4fe2-81a5-4ed6872a32e6", "name": "EUROHIST-FY2021", "fundId": "e9285a1c-1dfc-4380-868c-e74073003f43", "metadata": {"createdDate": "2021-09-28T02:45:14.028", "updatedDate": "2021-09-28T02:45:15.914+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 25000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.028 \N e9285a1c-1dfc-4380-868c-e74073003f43 684b5dc5-92f6-4db7-b996-b549d88f5e4e 383c59f9-d420-4f37-87ad-c0f7ee0e0283 {"id": "383c59f9-d420-4f37-87ad-c0f7ee0e0283", "name": "CANHIST-FY2021", "fundId": "68872d8a-bf16-420b-829f-206da38f6c10", "metadata": {"createdDate": "2021-09-28T02:45:13.972", "updatedDate": "2021-09-28T02:45:16.081+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 4000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.972 \N 68872d8a-bf16-420b-829f-206da38f6c10 684b5dc5-92f6-4db7-b996-b549d88f5e4e 47144c36-7180-4840-aff4-bc9788c78d89 {"id": "47144c36-7180-4840-aff4-bc9788c78d89", "name": "ENDOW-SUBN-FY2021", "fundId": "1714f71f-b845-444b-a79e-a577487a6f7d", "metadata": {"createdDate": "2021-09-28T02:45:14.229", "updatedDate": "2021-09-28T02:45:16.146+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 201000.0, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.229 \N 1714f71f-b845-444b-a79e-a577487a6f7d 684b5dc5-92f6-4db7-b996-b549d88f5e4e bd444215-1ce4-4101-9f10-1534fa137495 {"id": "bd444215-1ce4-4101-9f10-1534fa137495", "name": "CANLATHIST-FY2021", "fundId": "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "metadata": {"createdDate": "2021-09-28T02:45:14.181", "updatedDate": "2021-09-28T02:45:15.272+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Closed", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 12230.8, "allowableEncumbrance": 100.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.181 \N 67cd0046-e4f1-4e4f-9024-adf0b0039d09 684b5dc5-92f6-4db7-b996-b549d88f5e4e cdb8a544-8a7e-403a-a942-3ae3c9b41267 {"id": "cdb8a544-8a7e-403a-a942-3ae3c9b41267", "name": "GIFTS-ONE-TIME-FY2021", "fundId": "6506b79b-7702-48b2-9774-a1c538fdd34e", "metadata": {"createdDate": "2021-09-28T02:45:14.329", "updatedDate": "2021-09-28T02:45:16.022+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 0.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 28000.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:14.329 \N 6506b79b-7702-48b2-9774-a1c538fdd34e 684b5dc5-92f6-4db7-b996-b549d88f5e4e 012e7da4-003c-48ff-9feb-f3745044da35 {"id": "012e7da4-003c-48ff-9feb-f3745044da35", "name": "ANZHIST-FY2021", "fundId": "69640328-788e-43fc-9c3c-af39e243f3b7", "metadata": {"createdDate": "2021-09-28T02:45:13.671", "updatedDate": "2021-09-28T02:45:16.235+00:00"}, "acqUnitIds": [], "encumbered": 0.0, "allocationTo": 0.0, "budgetStatus": "Active", "expenditures": 0.0, "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "netTransfers": 2500.0, "allocationFrom": 0.0, "awaitingPayment": 0.0, "initialAllocation": 0.0, "allowableEncumbrance": 110.0, "allowableExpenditure": 100.0} 2021-09-28 02:45:13.671 \N 69640328-788e-43fc-9c3c-af39e243f3b7 684b5dc5-92f6-4db7-b996-b549d88f5e4e \. 10654.dat0000600 0004000 0002000 00000000445 14125567623 0014347 0ustar00postgrespostgres0000000 0000000 9e662186-7d3e-4732-baaa-93967ccc597e {"id": "9e662186-7d3e-4732-baaa-93967ccc597e", "status": "Active", "budgetId": "d71635df-c08c-49cc-9082-197a30fd0392", "expenseClassId": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2"} d71635df-c08c-49cc-9082-197a30fd0392 1bcc3247-99bf-4dca-9b0f-7bc51a2998c2 \. 10648.dat0000600 0004000 0002000 00000003026 14125567623 0014350 0ustar00postgrespostgres0000000 0000000 5b5ebe3a-cf8b-4f16-a880-46873ef21388 {"id": "5b5ebe3a-cf8b-4f16-a880-46873ef21388", "code": "Prn", "name": "Print", "metadata": {"createdDate": "2021-09-28T02:45:10.434+00:00", "updatedDate": "2021-09-28T02:45:10.434+00:00"}, "externalAccountNumberExt": "02"} 1bcc3247-99bf-4dca-9b0f-7bc51a2998c2 {"id": "1bcc3247-99bf-4dca-9b0f-7bc51a2998c2", "code": "Elec", "name": "Electronic", "metadata": {"createdDate": "2021-09-28T02:45:10.567+00:00", "updatedDate": "2021-09-28T02:45:10.567+00:00"}, "externalAccountNumberExt": "01"} 2bcc3248-99bf-4dca-9b0f-7bc51a2998c8 {"id": "2bcc3248-99bf-4dca-9b0f-7bc51a2998c8", "code": "a:b", "name": "Electronic1", "metadata": {"createdDate": "2021-10-01T11:15:05.604+00:00", "updatedDate": "2021-10-01T11:15:05.604+00:00", "createdByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb", "updatedByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb"}} 2bcc3248-99bf-4dca-9b0f-7bc51a2998c7 {"id": "2bcc3248-99bf-4dca-9b0f-7bc51a2998c7", "name": "test:1", "metadata": {"createdDate": "2021-10-01T11:15:40.360+00:00", "updatedDate": "2021-10-01T11:15:40.360+00:00", "createdByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb", "updatedByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb"}} 3bcc3248-99bf-5dca-9b0f-7bc51a2998c1 {"id": "3bcc3248-99bf-5dca-9b0f-7bc51a2998c1", "code": "test:2", "name": "test2", "metadata": {"createdDate": "2021-10-01T11:15:45.292+00:00", "updatedDate": "2021-10-01T11:15:45.292+00:00", "createdByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb", "updatedByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb"}} \. 10649.dat0000600 0004000 0002000 00000003361 14125567623 0014353 0ustar00postgrespostgres0000000 0000000 8da275b8-e099-49a1-9a31-b8241ff26ffc {"id": "8da275b8-e099-49a1-9a31-b8241ff26ffc", "code": "FY2019", "name": "FY19", "series": "FY", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.174", "updatedDate": "2021-09-28T02:45:12.174+00:00"}, "periodEnd": "2019-12-31T23:59:59.000+00:00", "acqUnitIds": [], "description": "Fiscal year 2019", "periodStart": "2019-01-01T00:00:00.000+00:00"} 2021-09-28 02:45:12.174 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e {"id": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "code": "FY2021", "name": "Fiscal Year 2021", "series": "FY", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.209", "updatedDate": "2021-09-28T02:45:12.209+00:00"}, "periodEnd": "2021-12-31T23:59:59.000+00:00", "acqUnitIds": [], "description": "Fiscal year for 2021", "periodStart": "2021-01-01T00:00:00.000+00:00"} 2021-09-28 02:45:12.209 \N fb86a6b6-5934-4eaf-ab09-80d45785be99 {"id": "fb86a6b6-5934-4eaf-ab09-80d45785be99", "code": "FY2018", "name": "Fiscal Year 2018", "series": "FY", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.238", "updatedDate": "2021-09-28T02:45:12.238+00:00"}, "periodEnd": "2018-12-31T23:59:59.000+00:00", "acqUnitIds": [], "description": "Fiscal year for 2018", "periodStart": "2018-01-01T00:00:00.000+00:00"} 2021-09-28 02:45:12.238 \N 78110b4e-2f8e-4eef-81ee-3058c0c7a9ee {"id": "78110b4e-2f8e-4eef-81ee-3058c0c7a9ee", "code": "FY2020", "name": "Fiscal Year 2020", "series": "FY", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.268", "updatedDate": "2021-09-28T02:45:12.268+00:00"}, "periodEnd": "2020-12-31T23:59:59.000+00:00", "acqUnitIds": [], "description": "Fiscal year for 2020", "periodStart": "2020-01-01T00:00:00.000+00:00"} 2021-09-28 02:45:12.268 \N \. 10652.dat0000600 0004000 0002000 00000036160 14125567623 0014350 0ustar00postgrespostgres0000000 0000000 a89eccf0-57a6-495e-898d-32b9b2210f2f {"id": "a89eccf0-57a6-495e-898d-32b9b2210f2f", "code": "MISCHIST", "name": "History Misc", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.572", "updatedDate": "2021-09-28T02:45:12.572+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "use for world history, general geography, historiography", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "185399996602278"} 2021-09-28 02:45:12.572 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N 69640328-788e-43fc-9c3c-af39e243f3b7 {"id": "69640328-788e-43fc-9c3c-af39e243f3b7", "code": "ANZHIST", "name": "Oceania History", "ledgerId": "7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de", "metadata": {"createdDate": "2021-09-28T02:45:12.614", "updatedDate": "2021-09-28T02:45:12.614+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "a6cffa87-7a64-4419-83d6-fa7af9d120e2", "description": "use for all Oceanic countries", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "115878270630030"} 2021-09-28 02:45:12.614 \N 7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de a6cffa87-7a64-4419-83d6-fa7af9d120e2 cf23adf0-61ba-4887-bf82-956c4aae2260 {"id": "cf23adf0-61ba-4887-bf82-956c4aae2260", "code": "ONE-TIME-SWEEP", "name": "FY Sweep Fund", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.652", "updatedDate": "2021-09-28T02:45:12.652+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "aea28ac6-f085-4833-bd54-d8f605d28d48", "description": "gathers all unused state funds at the end of the year, for final spend-out", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f", "65032151-39a5-4cef-8810-5350eb316300", "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "e9285a1c-1dfc-4380-868c-e74073003f43", "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "69640328-788e-43fc-9c3c-af39e243f3b7", "30fcc8e7-a019-43f4-b642-2edc389f4501", "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "f31a36de-fcf8-44f9-87ef-a55d06ad21ae", "a89eccf0-57a6-495e-898d-32b9b2210f2f", "68872d8a-bf16-420b-829f-206da38f6c10", "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79"], "externalAccountNo": "227752149017018"} 2021-09-28 02:45:12.652 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 aea28ac6-f085-4833-bd54-d8f605d28d48 6506b79b-7702-48b2-9774-a1c538fdd34e {"id": "6506b79b-7702-48b2-9774-a1c538fdd34e", "code": "GIFTS-ONE-TIME", "name": "Gifts (Non-recurring)", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.672", "updatedDate": "2021-09-28T02:45:12.672+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "addac225-947b-41b6-b80a-4c0b79261747", "description": "use for any one-time gift funds", "allocatedToIds": [], "allocatedFromIds": [], "externalAccountNo": "111079524628226"} 2021-09-28 02:45:12.672 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 addac225-947b-41b6-b80a-4c0b79261747 e9f9bc2f-bad5-4613-9d6c-f55efa5805e7 {"id": "e9f9bc2f-bad5-4613-9d6c-f55efa5805e7", "code": "GIFT-SUBN", "name": "One-time Gifts", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:12.693", "updatedDate": "2021-09-28T02:45:12.693+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "509775e4-3682-4c72-92ac-ab2d2fb3575f", "description": "use for any one-time gift funds; best used for backfile purchases", "allocatedToIds": [], "allocatedFromIds": [], "externalAccountNo": "257258813373141"} 2021-09-28 02:45:12.693 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 509775e4-3682-4c72-92ac-ab2d2fb3575f 1b6d3338-186e-4e35-9e75-1b886b0da53e {"id": "1b6d3338-186e-4e35-9e75-1b886b0da53e", "code": "GRANT-SUBN", "name": "Grants", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:12.817", "updatedDate": "2021-09-28T02:45:12.817+00:00"}, "acqUnitIds": [], "fundStatus": "Inactive", "fundTypeId": "509775e4-3682-4c72-92ac-ab2d2fb3575f", "description": "grant money used for subscriptions, data sets, or backfiles; do not activate this fund unless University Accounting alerts the library to specific grants received this year", "allocatedToIds": [], "allocatedFromIds": [], "externalAccountNo": "30155824699502"} 2021-09-28 02:45:12.817 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 509775e4-3682-4c72-92ac-ab2d2fb3575f 55f48dc6-efa7-4cfe-bc7c-4786efe493e3 {"id": "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "code": "ASIAHIST", "name": "Asian History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.849", "updatedDate": "2021-09-28T02:45:12.849+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "0f5f819e-0690-4c20-ad8d-cc23a6ecc585", "description": "use for East, Central, and South Asia", "allocatedToIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "allocatedFromIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "externalAccountNo": "94508839006119"} 2021-09-28 02:45:12.849 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 0f5f819e-0690-4c20-ad8d-cc23a6ecc585 30fcc8e7-a019-43f4-b642-2edc389f4501 {"id": "30fcc8e7-a019-43f4-b642-2edc389f4501", "code": "MIDEASTHIS", "name": "Middle Eastern History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.867", "updatedDate": "2021-09-28T02:45:12.867+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "includes North Africa, all Arabic countries, Israel", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "53862260514841"} 2021-09-28 02:45:12.867 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N f31a36de-fcf8-44f9-87ef-a55d06ad21ae {"id": "f31a36de-fcf8-44f9-87ef-a55d06ad21ae", "code": "SLAVHIST", "name": "Slavic & Eastern European History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.894", "updatedDate": "2021-09-28T02:45:12.894+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "used for Russia and all former Soviet countries", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "267293915282680"} 2021-09-28 02:45:12.894 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N 7fbd5d84-62d1-44c6-9c45-6cb173998bbd {"id": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "code": "AFRICAHIST", "name": "African History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.931", "updatedDate": "2021-09-28T02:45:12.931+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "c93373df-e7ec-4d31-b200-719736610d89", "description": "use only for sub-Saharan Africa & the black diaspora; use MIDEASTHIS for North Africa", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "140451294503633"} 2021-09-28 02:45:12.931 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 c93373df-e7ec-4d31-b200-719736610d89 bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0 {"id": "bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0", "code": "STATE-MONOSER", "name": "State-MonoSeries", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:12.945", "updatedDate": "2021-09-28T02:45:12.945+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "state funds used for monographic series and ongoing sets", "allocatedToIds": ["e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6"], "allocatedFromIds": ["e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6"], "externalAccountNo": "206521990498803"} 2021-09-28 02:45:12.945 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 \N e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79 {"id": "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79", "code": "LATAMHIST", "name": "Latin American History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:12.966", "updatedDate": "2021-09-28T02:45:12.966+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "WAITING FOR ADMIN APPROVAL; use for Mexicon, Central/South America, Caribbean once CANLATHIST is inactivated", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f", "67cd0046-e4f1-4e4f-9024-adf0b0039d09"], "externalAccountNo": "253815003172284"} 2021-09-28 02:45:12.966 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N 4428a37c-8bae-4f0d-865d-970d83d5ad55 {"id": "4428a37c-8bae-4f0d-865d-970d83d5ad55", "code": "UNIV-SUBN", "name": "University Allocation", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:12.988", "updatedDate": "2021-09-28T02:45:12.988+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "6d73d226-f56f-4338-9584-e91a83d5ecec", "description": "university money used for ongoing subscriptions", "allocatedToIds": [], "allocatedFromIds": [], "externalAccountNo": "74941332229038"} 2021-09-28 02:45:12.988 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 6d73d226-f56f-4338-9584-e91a83d5ecec 1714f71f-b845-444b-a79e-a577487a6f7d {"id": "1714f71f-b845-444b-a79e-a577487a6f7d", "code": "ENDOW-SUBN", "name": "Endowments", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:13.023", "updatedDate": "2021-09-28T02:45:13.023+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "fundTypeId": "83ccb063-b6d8-467c-b3dc-02e49fdf7c96", "description": "ongoing endowments used for subscriptions", "allocatedToIds": [], "allocatedFromIds": [], "externalAccountNo": "25378812835909"} 2021-09-28 02:45:13.023 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 83ccb063-b6d8-467c-b3dc-02e49fdf7c96 68872d8a-bf16-420b-829f-206da38f6c10 {"id": "68872d8a-bf16-420b-829f-206da38f6c10", "code": "CANHIST", "name": "Canadian History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:13.044", "updatedDate": "2021-09-28T02:45:13.044+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "WAITING FOR ADMIN APPROVAL; use for Canada once CANLATHIST is inactivated", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f", "67cd0046-e4f1-4e4f-9024-adf0b0039d09"], "externalAccountNo": "114929793941270"} 2021-09-28 02:45:13.044 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N 67cd0046-e4f1-4e4f-9024-adf0b0039d09 {"id": "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "code": "CANLATHIST", "name": "Can/LatAm History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:13.068", "updatedDate": "2021-09-28T02:45:13.068+00:00"}, "acqUnitIds": [], "fundStatus": "Inactive", "description": "used for all North/South America & Caribbean countries except US; will be inactivated once separate funds for Can and LatAm are approved", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "1242363322421"} 2021-09-28 02:45:13.068 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6 {"id": "e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6", "code": "STATE-SUBN", "name": "State-Subscriptions", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:13.093", "updatedDate": "2021-09-28T02:45:13.093+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "state funds used for ongoing subscriptions", "allocatedToIds": ["bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0"], "allocatedFromIds": ["bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0"], "externalAccountNo": "252110810479877"} 2021-09-28 02:45:13.093 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 \N fb7b70f1-b898-4924-a991-0e4b6312bb5f {"id": "fb7b70f1-b898-4924-a991-0e4b6312bb5f", "code": "HIST", "name": "History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:13.124", "updatedDate": "2021-09-28T02:45:13.124+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "subdivided by geographic regions, to match individual selectors", "allocatedToIds": ["65032151-39a5-4cef-8810-5350eb316300", "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "e9285a1c-1dfc-4380-868c-e74073003f43", "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "69640328-788e-43fc-9c3c-af39e243f3b7", "30fcc8e7-a019-43f4-b642-2edc389f4501", "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "f31a36de-fcf8-44f9-87ef-a55d06ad21ae", "a89eccf0-57a6-495e-898d-32b9b2210f2f", "cf23adf0-61ba-4887-bf82-956c4aae2260", "68872d8a-bf16-420b-829f-206da38f6c10", "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79"], "allocatedFromIds": [], "externalAccountNo": "276507594438808"} 2021-09-28 02:45:13.124 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N d6f7c1ba-a237-465e-94ed-f37e91bc64bd {"id": "d6f7c1ba-a237-465e-94ed-f37e91bc64bd", "code": "EXCH-SUBN", "name": "Exchanges", "ledgerId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "metadata": {"createdDate": "2021-09-28T02:45:13.144", "updatedDate": "2021-09-28T02:45:13.144+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "special funds allocated to fund subscriptions sent to exchange partner libraries", "allocatedToIds": [], "allocatedFromIds": ["e54b1f4d-7d05-4b1a-9368-3c36b75d8ac6", "4428a37c-8bae-4f0d-865d-970d83d5ad55"], "externalAccountNo": "236359595500087"} 2021-09-28 02:45:13.144 \N 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 \N e9285a1c-1dfc-4380-868c-e74073003f43 {"id": "e9285a1c-1dfc-4380-868c-e74073003f43", "code": "EUROHIST", "name": "European History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:13.182", "updatedDate": "2021-09-28T02:45:13.182+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "do not use for former Soviet countries; use SLAVHIST instead", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "256359519755772"} 2021-09-28 02:45:13.182 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N 65032151-39a5-4cef-8810-5350eb316300 {"id": "65032151-39a5-4cef-8810-5350eb316300", "code": "USHIST", "name": "US History", "ledgerId": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "metadata": {"createdDate": "2021-09-28T02:45:13.203", "updatedDate": "2021-09-28T02:45:13.203+00:00"}, "acqUnitIds": [], "fundStatus": "Active", "description": "used for all US states and territories", "allocatedToIds": ["cf23adf0-61ba-4887-bf82-956c4aae2260"], "allocatedFromIds": ["fb7b70f1-b898-4924-a991-0e4b6312bb5f"], "externalAccountNo": "111064118278565"} 2021-09-28 02:45:13.203 \N 133a7916-f05e-4df4-8f7f-09eb2a7076d1 \N b7af1dd2-8699-4f4b-98fd-b86ae5685100 {"id": "b7af1dd2-8699-4f4b-98fd-b86ae5685100", "code": "test:fund", "name": "Test fund", "ledgerId": "7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de", "metadata": {"createdDate": "2021-10-01T11:15:58.451", "updatedDate": "2021-10-01T11:15:58.451+00:00", "createdByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb", "updatedByUserId": "5eb26fb6-1856-5b17-a3fa-c8db68b35ffb"}, "acqUnitIds": [], "fundStatus": "Active", "allocatedToIds": [], "allocatedFromIds": []} 2021-10-01 11:15:58.451 5eb26fb6-1856-5b17-a3fa-c8db68b35ffb 7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de \N \. 10651.dat0000600 0004000 0002000 00000005253 14125567623 0014346 0ustar00postgrespostgres0000000 0000000 8b03b70a-a3e6-459c-9e8f-b7e9a7087052 {"id": "8b03b70a-a3e6-459c-9e8f-b7e9a7087052", "name": "Other"} 0f5f819e-0690-4c20-ad8d-cc23a6ecc585 {"id": "0f5f819e-0690-4c20-ad8d-cc23a6ecc585", "name": "Faculty"} 509775e4-3682-4c72-92ac-ab2d2fb3575f {"id": "509775e4-3682-4c72-92ac-ab2d2fb3575f", "name": "Grants"} a7da939e-799b-4c0b-9b94-a06df51a4b90 {"id": "a7da939e-799b-4c0b-9b94-a06df51a4b90", "name": "Unrestricted"} a5060e05-47db-4ba5-8d16-760f9578aaa9 {"id": "a5060e05-47db-4ba5-8d16-760f9578aaa9", "name": "Subscriptions"} 4fdf4bf7-0508-4159-89f4-0d64b2d7e0e4 {"id": "4fdf4bf7-0508-4159-89f4-0d64b2d7e0e4", "name": "Serials"} 99595e88-954b-4f23-ae7e-afb063aae458 {"id": "99595e88-954b-4f23-ae7e-afb063aae458", "name": "Books"} d28c844a-bead-489e-a889-e3951b884f3f {"id": "d28c844a-bead-489e-a889-e3951b884f3f", "name": "Standing orders"} 45dce82a-68fa-4ab8-aa50-f51ba6ecb613 {"id": "45dce82a-68fa-4ab8-aa50-f51ba6ecb613", "name": "Electronic"} d49c4392-5a02-4b15-ba9d-5ae7315f44cf {"id": "d49c4392-5a02-4b15-ba9d-5ae7315f44cf", "name": "EBA"} c93373df-e7ec-4d31-b200-719736610d89 {"id": "c93373df-e7ec-4d31-b200-719736610d89", "name": "Approvals"} aea28ac6-f085-4833-bd54-d8f605d28d48 {"id": "aea28ac6-f085-4833-bd54-d8f605d28d48", "name": "One-time"} 83ccb063-b6d8-467c-b3dc-02e49fdf7c96 {"id": "83ccb063-b6d8-467c-b3dc-02e49fdf7c96", "name": "Endowments"} a1c94be4-d004-4f1a-ab21-343c33e48efa {"id": "a1c94be4-d004-4f1a-ab21-343c33e48efa", "name": "DDA/PDA"} 6d73d226-f56f-4338-9584-e91a83d5ecec {"id": "6d73d226-f56f-4338-9584-e91a83d5ecec", "name": "College/University funds"} 826dfc35-b247-4553-a4d7-53eb0e1eadbc {"id": "826dfc35-b247-4553-a4d7-53eb0e1eadbc", "name": "Audio"} 5604ee8b-d241-49b8-8baf-66b6c46bf14f {"id": "5604ee8b-d241-49b8-8baf-66b6c46bf14f", "name": "Physical"} 13d8beb0-56b6-4435-9934-09305c2d6c88 {"id": "13d8beb0-56b6-4435-9934-09305c2d6c88", "name": "Technical"} b61c08df-67b7-4e14-93f7-2d228dba6724 {"id": "b61c08df-67b7-4e14-93f7-2d228dba6724", "name": "State funds"} 1db71218-f3e5-4514-b0bd-28f28f6b3fb2 {"id": "1db71218-f3e5-4514-b0bd-28f28f6b3fb2", "name": "Exchange"} d87b3e95-be8a-4800-9733-3fa16f0c4266 {"id": "d87b3e95-be8a-4800-9733-3fa16f0c4266", "name": "Video"} addac225-947b-41b6-b80a-4c0b79261747 {"id": "addac225-947b-41b6-b80a-4c0b79261747", "name": "Gifts"} 9d4e8e26-99e4-4134-9b7e-9f59da72380e {"id": "9d4e8e26-99e4-4134-9b7e-9f59da72380e", "name": "Restricted"} a6cffa87-7a64-4419-83d6-fa7af9d120e2 {"id": "a6cffa87-7a64-4419-83d6-fa7af9d120e2", "name": "Monographs"} d1a84034-ca42-4815-9f8a-4efddbfc7db6 {"id": "d1a84034-ca42-4815-9f8a-4efddbfc7db6", "name": "Ongoing"} ace38b12-e6fc-49f2-bbd4-f3e2960d9b3d {"id": "ace38b12-e6fc-49f2-bbd4-f3e2960d9b3d", "name": "Firm orders"} \. 10657.dat0000600 0004000 0002000 00000012261 14125567623 0014351 0ustar00postgrespostgres0000000 0000000 b89eccf0-57a6-495e-898d-32b9b2210f2f {"id": "b89eccf0-57a6-495e-898d-32b9b2210f2f", "fundId": "a89eccf0-57a6-495e-898d-32b9b2210f2f", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "4207567e-73c9-45c8-8850-8458389ae0ed", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 4207567e-73c9-45c8-8850-8458389ae0ed f33ed99b-852a-4f90-9891-5efe0feab165 a89eccf0-57a6-495e-898d-32b9b2210f2f 684b5dc5-92f6-4db7-b996-b549d88f5e4e 8fbd5d84-62d1-44c6-9c45-6cb173998bbd {"id": "8fbd5d84-62d1-44c6-9c45-6cb173998bbd", "fundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "d71635df-c08c-49cc-9082-197a30fd0392", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} d71635df-c08c-49cc-9082-197a30fd0392 f33ed99b-852a-4f90-9891-5efe0feab165 7fbd5d84-62d1-44c6-9c45-6cb173998bbd 684b5dc5-92f6-4db7-b996-b549d88f5e4e 0c7b70f1-b898-4924-a991-0e4b6312bb5f {"id": "0c7b70f1-b898-4924-a991-0e4b6312bb5f", "fundId": "fb7b70f1-b898-4924-a991-0e4b6312bb5f", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "f6aea7f1-e614-4010-a2f7-913bb63d1561", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} f6aea7f1-e614-4010-a2f7-913bb63d1561 f33ed99b-852a-4f90-9891-5efe0feab165 fb7b70f1-b898-4924-a991-0e4b6312bb5f 684b5dc5-92f6-4db7-b996-b549d88f5e4e 77cd0046-e4f1-4e4f-9024-adf0b0039d09 {"id": "77cd0046-e4f1-4e4f-9024-adf0b0039d09", "fundId": "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "bd444215-1ce4-4101-9f10-1534fa137495", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} bd444215-1ce4-4101-9f10-1534fa137495 f33ed99b-852a-4f90-9891-5efe0feab165 67cd0046-e4f1-4e4f-9024-adf0b0039d09 684b5dc5-92f6-4db7-b996-b549d88f5e4e 79640328-788e-43fc-9c3c-af39e243f3b7 {"id": "79640328-788e-43fc-9c3c-af39e243f3b7", "fundId": "69640328-788e-43fc-9c3c-af39e243f3b7", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "012e7da4-003c-48ff-9feb-f3745044da35", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 012e7da4-003c-48ff-9feb-f3745044da35 f33ed99b-852a-4f90-9891-5efe0feab165 69640328-788e-43fc-9c3c-af39e243f3b7 684b5dc5-92f6-4db7-b996-b549d88f5e4e 40fcc8e7-a019-43f4-b642-2edc389f4501 {"id": "40fcc8e7-a019-43f4-b642-2edc389f4501", "fundId": "30fcc8e7-a019-43f4-b642-2edc389f4501", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "4eadbf22-e6dc-4ea4-9453-c6e9de2cb5a8", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 4eadbf22-e6dc-4ea4-9453-c6e9de2cb5a8 f33ed99b-852a-4f90-9891-5efe0feab165 30fcc8e7-a019-43f4-b642-2edc389f4501 684b5dc5-92f6-4db7-b996-b549d88f5e4e 75032151-39a5-4cef-8810-5350eb316300 {"id": "75032151-39a5-4cef-8810-5350eb316300", "fundId": "65032151-39a5-4cef-8810-5350eb316300", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "5255e36f-4444-49d5-baa3-38f7f687f69d", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 5255e36f-4444-49d5-baa3-38f7f687f69d f33ed99b-852a-4f90-9891-5efe0feab165 65032151-39a5-4cef-8810-5350eb316300 684b5dc5-92f6-4db7-b996-b549d88f5e4e 78872d8a-bf16-420b-829f-206da38f6c10 {"id": "78872d8a-bf16-420b-829f-206da38f6c10", "fundId": "68872d8a-bf16-420b-829f-206da38f6c10", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "383c59f9-d420-4f37-87ad-c0f7ee0e0283", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 383c59f9-d420-4f37-87ad-c0f7ee0e0283 f33ed99b-852a-4f90-9891-5efe0feab165 68872d8a-bf16-420b-829f-206da38f6c10 684b5dc5-92f6-4db7-b996-b549d88f5e4e 041a36de-fcf8-44f9-87ef-a55d06ad21ae {"id": "041a36de-fcf8-44f9-87ef-a55d06ad21ae", "fundId": "f31a36de-fcf8-44f9-87ef-a55d06ad21ae", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "a7c63802-4c1a-4646-9392-024e08df9c02", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} a7c63802-4c1a-4646-9392-024e08df9c02 f33ed99b-852a-4f90-9891-5efe0feab165 f31a36de-fcf8-44f9-87ef-a55d06ad21ae 684b5dc5-92f6-4db7-b996-b549d88f5e4e f9285a1c-1dfc-4380-868c-e74073003f43 {"id": "f9285a1c-1dfc-4380-868c-e74073003f43", "fundId": "e9285a1c-1dfc-4380-868c-e74073003f43", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "34fe0c8b-2b99-4fe2-81a5-4ed6872a32e6", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 34fe0c8b-2b99-4fe2-81a5-4ed6872a32e6 f33ed99b-852a-4f90-9891-5efe0feab165 e9285a1c-1dfc-4380-868c-e74073003f43 684b5dc5-92f6-4db7-b996-b549d88f5e4e 65f48dc6-efa7-4cfe-bc7c-4786efe493e3 {"id": "65f48dc6-efa7-4cfe-bc7c-4786efe493e3", "fundId": "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "de6761f6-1f64-4b5d-a5bc-98862c498c21", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} de6761f6-1f64-4b5d-a5bc-98862c498c21 f33ed99b-852a-4f90-9891-5efe0feab165 55f48dc6-efa7-4cfe-bc7c-4786efe493e3 684b5dc5-92f6-4db7-b996-b549d88f5e4e f6d7e91a-4dbc-4a70-9b38-e000d2fbdc79 {"id": "f6d7e91a-4dbc-4a70-9b38-e000d2fbdc79", "fundId": "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79", "groupId": "f33ed99b-852a-4f90-9891-5efe0feab165", "budgetId": "53c28e77-4623-4af7-ad3d-60a9ba470c45", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 53c28e77-4623-4af7-ad3d-60a9ba470c45 f33ed99b-852a-4f90-9891-5efe0feab165 e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79 684b5dc5-92f6-4db7-b996-b549d88f5e4e \. 10656.dat0000600 0004000 0002000 00000000757 14125567623 0014357 0ustar00postgrespostgres0000000 0000000 f33ed99b-852a-4f90-9891-5efe0feab165 {"id": "f33ed99b-852a-4f90-9891-5efe0feab165", "code": "HIST", "name": "History", "status": "Active", "metadata": {"createdDate": "2021-09-28T02:45:12.073", "updatedDate": "2021-09-28T02:45:12.073+00:00"}, "acqUnitIds": [], "description": "History is an umbrella term that relates to past events as well as the memory, discovery, collection, organization, presentation, and interpretation of information about these events."} 2021-09-28 02:45:12.073 \N \. 10660.dat0000600 0004000 0002000 00000000005 14125567623 0014334 0ustar00postgrespostgres0000000 0000000 \. 10650.dat0000600 0004000 0002000 00000003217 14125567623 0014343 0ustar00postgrespostgres0000000 0000000 133a7916-f05e-4df4-8f7f-09eb2a7076d1 {"id": "133a7916-f05e-4df4-8f7f-09eb2a7076d1", "code": "ONETIME", "name": "One-time", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.376", "updatedDate": "2021-09-28T02:45:12.376+00:00"}, "acqUnitIds": [], "description": "Funds used for any non-recurring purchases", "ledgerStatus": "Active", "fiscalYearOneId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "restrictEncumbrance": false, "restrictExpenditures": false} 2021-09-28 02:45:12.376 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de {"id": "7cef8378-7cbd-1fae-bcdd-8b9d7c0af9de", "code": "MAIN-LIB", "name": "Main Library", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.431", "updatedDate": "2021-09-28T02:45:12.431+00:00"}, "acqUnitIds": ["0ebb1f7d-983f-3026-8a4c-5318e0ebc041"], "description": "This is the ledger for the Main Library", "ledgerStatus": "Active", "fiscalYearOneId": "fb86a6b6-5934-4eaf-ab09-80d45785be99", "restrictEncumbrance": true, "restrictExpenditures": true} 2021-09-28 02:45:12.431 \N fb86a6b6-5934-4eaf-ab09-80d45785be99 65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61 {"id": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61", "code": "ONGOING", "name": "Ongoing", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:12.483", "updatedDate": "2021-09-28T02:45:12.483+00:00"}, "acqUnitIds": ["0ebb1f7d-983f-3026-8a4c-5318e0ebc041"], "description": "Funds used for all recurring purchases", "ledgerStatus": "Frozen", "fiscalYearOneId": "fb86a6b6-5934-4eaf-ab09-80d45785be99", "restrictEncumbrance": true, "restrictExpenditures": true} 2021-09-28 02:45:12.483 \N fb86a6b6-5934-4eaf-ab09-80d45785be99 \. 10662.dat0000600 0004000 0002000 00000000005 14125567623 0014336 0ustar00postgrespostgres0000000 0000000 \. 10664.dat0000600 0004000 0002000 00000000005 14125567623 0014340 0ustar00postgrespostgres0000000 0000000 \. 10663.dat0000600 0004000 0002000 00000000005 14125567623 0014337 0ustar00postgrespostgres0000000 0000000 \. 10658.dat0000600 0004000 0002000 00000000005 14125567623 0014343 0ustar00postgrespostgres0000000 0000000 \. 10644.dat0000600 0004000 0002000 00000052613 14125567623 0014352 0ustar00postgrespostgres0000000 0000000 1 {"rmbVersion": "33.0.0", "schemaJson": "{\\n \\"exactCount\\" : 20000,\\n \\"scripts\\": [\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"group_budget_view.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/transaction.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/ledgers.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/funds.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/fiscal_years.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/budgets.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.2.1\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/delete_trigger_functions.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.2.1\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/transaction_source_enum.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-5.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/pending_payment_cross_module.ftl\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-5.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/fill_budget_net_transfer.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/update_processed_order_transaction_summary.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/update_order_encumbrance.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/update_encumbrances_order_status.ftl\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.3\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"migration/update_budget_summary_information.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"budget_financial_summary_view.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\"\\n },\\n {\\n \\"run\\": \\"after\\",\\n \\"snippetPath\\": \\"budget_encumbrances_rollover.sql\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.1.1\\"\\n }\\n ],\\n \\"tables\\": [\\n {\\n \\"tableName\\": \\"expense_class\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\",\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"fiscal_year\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-5.0.0\\",\\n \\"withMetadata\\": true,\\n \\"index\\": [\\n {\\n \\"fieldName\\" : \\"periodEnd\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"acqUnitIds\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"series\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"ledger\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-5.0.0\\",\\n \\"withMetadata\\": true,\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"fiscalYearOneId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"index\\": [\\n {\\n \\"fieldName\\": \\"ledgerStatus\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"acqUnitIds\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"fund_type\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\",\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"fund\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\",\\n \\"withMetadata\\": true,\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"ledgerId\\",\\n \\"targetTable\\": \\"ledger\\",\\n \\"tableAlias\\": \\"fund\\",\\n \\"targetTableAlias\\": \\"ledger\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fundTypeId\\",\\n \\"targetTable\\": \\"fund_type\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"acqUnitIds\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"fundStatus\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"fund_status\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"currency\\",\\n \\"tOps\\": \\"DELETE\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"budget\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.1.2\\",\\n \\"withMetadata\\": true,\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"fundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tableAlias\\": \\"budget\\",\\n \\"targetTableAlias\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"targetPath\\": [\\"fundId\\", \\"ledgerId\\"],\\n \\"targetTable\\": \\"ledger\\",\\n \\"targetTableAlias\\": \\"ledger\\",\\n \\"tableAlias\\": \\"budget\\"\\n },\\n {\\n \\"fieldName\\": \\"fiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tableAlias\\": \\"budget\\",\\n \\"targetTableAlias\\": \\"fiscalYear\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"fundId, fiscalYearId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"budget_status\\",\\n \\"tOps\\": \\"DELETE\\"\\n },\\n {\\n \\"fieldName\\": \\"budgetStatus\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"budget_expense_class\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\",\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"budgetId_expenseClassId\\",\\n \\"multiFieldNames\\": \\"budgetId, expenseClassId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"budgetId\\",\\n \\"targetTable\\": \\"budget\\",\\n \\"tableAlias\\": \\"budgetExpenseClass\\",\\n \\"targetTableAlias\\": \\"budget\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"expenseClassId\\",\\n \\"targetTable\\": \\"expense_class\\",\\n \\"tableAlias\\": \\"budgetExpenseClass\\",\\n \\"targetTableAlias\\": \\"expenseClass\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"fund_distribution\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.2.1\\",\\n \\"mode\\": \\"delete\\",\\n \\"auditingTableName\\": \\"NOT_EXISTING_AUDITING_TABLE\\"\\n },\\n {\\n \\"tableName\\": \\"transaction\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.1.0\\",\\n \\"withMetadata\\": true,\\n \\"customSnippetPath\\": \\"transactions.sql\\",\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"encumbrance\\",\\n \\"multiFieldNames\\": \\"amount, fromFundId, encumbrance.sourcePurchaseOrderId, encumbrance.sourcePoLineId, encumbrance.initialAmountEncumbered, encumbrance.status, expenseClassId, fiscalYearId\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"whereClause\\": \\"WHERE (jsonb->>'transactionType')::text = 'Encumbrance'\\"\\n },\\n {\\n \\"fieldName\\": \\"payment\\",\\n \\"multiFieldNames\\": \\"amount, fromFundId, sourceInvoiceId, sourceInvoiceLineId, transactionType, expenseClassId\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"whereClause\\": \\"WHERE (jsonb->>'transactionType')::text = 'Payment' OR (jsonb->>'transactionType')::text = 'Pending payment'\\"\\n },\\n {\\n \\"fieldName\\": \\"credit\\",\\n \\"multiFieldNames\\": \\"amount, toFundId, sourceInvoiceId, sourceInvoiceLineId, transactionType, expenseClassId\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"whereClause\\": \\"WHERE (jsonb->>'transactionType')::text = 'Credit'\\"\\n }\\n ],\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"fiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fromFundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"sourceFiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"toFundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"expenseClassId\\",\\n \\"targetTable\\": \\"expense_class\\"\\n }\\n ],\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"amount\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"groups\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\",\\n \\"withMetadata\\": true,\\n \\"ginIndex\\": [\\n {\\n \\"fieldName\\": \\"status\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"acqUnitIds\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"code\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"name\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"ledgerFY\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\",\\n \\"mode\\": \\"delete\\",\\n \\"auditingTableName\\": \\"NOT_EXISTING_AUDITING_TABLE\\"\\n },\\n {\\n \\"tableName\\": \\"group_fund_fiscal_year\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\",\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"budgetId\\",\\n \\"targetTable\\": \\"budget\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"targetTableAlias\\": \\"budget\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"groupId\\",\\n \\"targetTable\\": \\"groups\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"targetTableAlias\\": \\"group\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"targetTableAlias\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"targetTableAlias\\": \\"fiscalYear\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"targetPath\\": [\\n \\"fundId\\",\\n \\"ledgerId\\"\\n ],\\n \\"targetTable\\": \\"ledger\\",\\n \\"targetTableAlias\\": \\"ledger\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"targetPath\\": [\\"fundId\\", \\"fundTypeId\\"],\\n \\"targetTable\\": \\"fund_type\\",\\n \\"targetTableAlias\\": \\"fundType\\",\\n \\"tableAlias\\": \\"groupFundFY\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"groupId, fundId, fiscalYearId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"order_transaction_summaries\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.0.0\\"\\n },\\n {\\n \\"tableName\\": \\"temporary_order_transactions\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\",\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"encumbrance.sourcePurchaseOrderId\\",\\n \\"targetTable\\": \\"order_transaction_summaries\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fromFundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n }, {\\n \\"fieldName\\": \\"expenseClassId\\",\\n \\"targetTable\\": \\"expense_class\\"\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"temp_order_tx\\",\\n \\"multiFieldNames\\": \\"amount, fromFundId, encumbrance.sourcePurchaseOrderId, encumbrance.sourcePoLineId, encumbrance.initialAmountEncumbered, encumbrance.status, expenseClassId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"invoice_transaction_summaries\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.2.1\\"\\n },\\n {\\n \\"tableName\\": \\"temporary_invoice_transactions\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-6.0.0\\",\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"temp_invoice_tx\\",\\n \\"sqlExpression\\": \\"concat_space_sql(lower(f_unaccent(jsonb->>'amount')) , lower(f_unaccent(jsonb->>'fromFundId')) , lower(f_unaccent(jsonb->>'sourceInvoiceId')) , lower(f_unaccent(jsonb->>'sourceInvoiceLineId')) , lower(f_unaccent(jsonb->>'toFundId')) , lower(f_unaccent(jsonb->>'transactionType')), lower(f_unaccent(jsonb->>'expenseClassId')))\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"sourceInvoiceId\\",\\n \\"targetTable\\": \\"invoice_transaction_summaries\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"paymentEncumbranceId\\",\\n \\"targetTable\\": \\"transaction\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fromFundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"toFundId\\",\\n \\"targetTable\\": \\"fund\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"fiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\",\\n \\"tOps\\": \\"ADD\\"\\n },\\n {\\n \\"fieldName\\": \\"expenseClassId\\",\\n \\"targetTable\\": \\"expense_class\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"temporary_invoice_payments\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-4.2.1\\",\\n \\"mode\\": \\"delete\\",\\n \\"auditingTableName\\": \\"NOT_EXISTING_AUDITING_TABLE\\"\\n },\\n {\\n \\"tableName\\": \\"ledger_fiscal_year_rollover\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\",\\n \\"withMetadata\\": true,\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"ledgerId\\",\\n \\"targetTable\\": \\"ledger\\"\\n },\\n {\\n \\"fieldName\\": \\"fromFiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\"\\n },\\n {\\n \\"fieldName\\": \\"toFiscalYearId\\",\\n \\"targetTable\\": \\"fiscal_year\\"\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"ledgerId_fromFiscalYearId\\",\\n \\"multiFieldNames\\": \\"ledgerId, fromFiscalYearId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"ledger_fiscal_year_rollover_progress\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\",\\n \\"withMetadata\\": true,\\n \\"index\\": [\\n {\\n \\"fieldName\\": \\"overallRolloverStatus\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n }\\n ],\\n \\"uniqueIndex\\": [\\n {\\n \\"fieldName\\": \\"ledgerRolloverId\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ],\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"ledgerRolloverId\\",\\n \\"targetTable\\": \\"ledger_fiscal_year_rollover\\",\\n \\"tableAlias\\": \\"ledgerFYROProgress\\",\\n \\"targetTableAlias\\": \\"ledgerFYRO\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n },\\n {\\n \\"tableName\\": \\"ledger_fiscal_year_rollover_error\\",\\n \\"fromModuleVersion\\": \\"mod-finance-storage-7.0.0\\",\\n \\"withMetadata\\": true,\\n \\"index\\": [\\n {\\n \\"fieldName\\": \\"details.purchaseOrderId\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"details.fundId\\",\\n \\"tOps\\": \\"ADD\\",\\n \\"caseSensitive\\": false,\\n \\"removeAccents\\": true\\n },\\n {\\n \\"fieldName\\": \\"errorType\\"\\n }\\n ],\\n \\"foreignKeys\\": [\\n {\\n \\"fieldName\\": \\"ledgerRolloverId\\",\\n \\"targetTable\\": \\"ledger_fiscal_year_rollover\\",\\n \\"tableAlias\\": \\"ledgerFYROError\\",\\n \\"targetTableAlias\\": \\"ledgerFYRO\\",\\n \\"tOps\\": \\"ADD\\"\\n }\\n ]\\n }\\n ]\\n}\\n", "moduleVersion": "mod-finance-storage-7.1.1"} \. 10647.dat0000600 0004000 0002000 00000000005 14125567623 0014341 0ustar00postgrespostgres0000000 0000000 \. 10646.dat0000600 0004000 0002000 00000022545 14125567623 0014355 0ustar00postgrespostgres0000000 0000000 expense_class_name_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS expense_class_name_idx_unique ON diku_mod_finance_storage.expense_class (lower(f_unaccent(jsonb->>'name'))) f expense_class_code_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS expense_class_code_idx_unique ON diku_mod_finance_storage.expense_class (lower(f_unaccent(jsonb->>'code'))) f fiscal_year_periodEnd_idx CREATE INDEX IF NOT EXISTS fiscal_year_periodEnd_idx ON diku_mod_finance_storage.fiscal_year (left(lower(f_unaccent(jsonb->>'periodEnd')),600)) f fiscal_year_code_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS fiscal_year_code_idx_unique ON diku_mod_finance_storage.fiscal_year (lower(f_unaccent(jsonb->>'code'))) f fiscal_year_name_idx_gin CREATE INDEX IF NOT EXISTS fiscal_year_name_idx_gin ON diku_mod_finance_storage.fiscal_year USING GIN ((lower(f_unaccent(jsonb->>'name'))) public.gin_trgm_ops) f fiscal_year_acqUnitIds_idx_gin CREATE INDEX IF NOT EXISTS fiscal_year_acqUnitIds_idx_gin ON diku_mod_finance_storage.fiscal_year USING GIN ((lower(f_unaccent(jsonb->>'acqUnitIds'))) public.gin_trgm_ops) f fiscal_year_series_idx_gin CREATE INDEX IF NOT EXISTS fiscal_year_series_idx_gin ON diku_mod_finance_storage.fiscal_year USING GIN ((lower(f_unaccent(jsonb->>'series'))) public.gin_trgm_ops) f ledger_ledgerStatus_idx CREATE INDEX IF NOT EXISTS ledger_ledgerStatus_idx ON diku_mod_finance_storage.ledger (left(lower(f_unaccent(jsonb->>'ledgerStatus')),600)) f ledger_name_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS ledger_name_idx_unique ON diku_mod_finance_storage.ledger (lower(f_unaccent(jsonb->>'name'))) f ledger_code_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS ledger_code_idx_unique ON diku_mod_finance_storage.ledger (lower(f_unaccent(jsonb->>'code'))) f ledger_name_idx_gin CREATE INDEX IF NOT EXISTS ledger_name_idx_gin ON diku_mod_finance_storage.ledger USING GIN ((lower(f_unaccent(jsonb->>'name'))) public.gin_trgm_ops) f ledger_code_idx_gin CREATE INDEX IF NOT EXISTS ledger_code_idx_gin ON diku_mod_finance_storage.ledger USING GIN ((lower(f_unaccent(jsonb->>'code'))) public.gin_trgm_ops) f ledger_acqUnitIds_idx_gin CREATE INDEX IF NOT EXISTS ledger_acqUnitIds_idx_gin ON diku_mod_finance_storage.ledger USING GIN ((lower(f_unaccent(jsonb->>'acqUnitIds'))) public.gin_trgm_ops) f fund_type_name_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS fund_type_name_idx_unique ON diku_mod_finance_storage.fund_type (lower(f_unaccent(jsonb->>'name'))) f fund_code_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS fund_code_idx_unique ON diku_mod_finance_storage.fund (lower(f_unaccent(jsonb->>'code'))) f fund_name_idx_gin CREATE INDEX IF NOT EXISTS fund_name_idx_gin ON diku_mod_finance_storage.fund USING GIN ((lower(f_unaccent(jsonb->>'name'))) public.gin_trgm_ops) f fund_acqUnitIds_idx_gin CREATE INDEX IF NOT EXISTS fund_acqUnitIds_idx_gin ON diku_mod_finance_storage.fund USING GIN ((lower(f_unaccent(jsonb->>'acqUnitIds'))) public.gin_trgm_ops) f fund_fundStatus_idx_gin CREATE INDEX IF NOT EXISTS fund_fundStatus_idx_gin ON diku_mod_finance_storage.fund USING GIN ((lower(f_unaccent(jsonb->>'fundStatus'))) public.gin_trgm_ops) f budget_fundId_fiscalYearId_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS budget_fundId_fiscalYearId_idx_unique ON diku_mod_finance_storage.budget (lower(f_unaccent(jsonb->>'fundId')) , lower(f_unaccent(jsonb->>'fiscalYearId'))) f budget_budgetStatus_idx_gin CREATE INDEX IF NOT EXISTS budget_budgetStatus_idx_gin ON diku_mod_finance_storage.budget USING GIN ((lower(f_unaccent(jsonb->>'budgetStatus'))) public.gin_trgm_ops) f budget_expense_class_budgetId_expenseClassId_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS budget_expense_class_budgetId_expenseClassId_idx_unique ON diku_mod_finance_storage.budget_expense_class (lower(f_unaccent(concat_space_sql(budget_expense_class.jsonb->>'budgetId' , budget_expense_class.jsonb->>'expenseClassId')))) f transaction_encumbrance_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS transaction_encumbrance_idx_unique ON diku_mod_finance_storage.transaction (lower(f_unaccent(concat_space_sql(transaction.jsonb->>'amount' , transaction.jsonb->>'fromFundId' , transaction.jsonb->'encumbrance'->>'sourcePurchaseOrderId' , transaction.jsonb->'encumbrance'->>'sourcePoLineId' , transaction.jsonb->'encumbrance'->>'initialAmountEncumbered' , transaction.jsonb->'encumbrance'->>'status' , transaction.jsonb->>'expenseClassId' , transaction.jsonb->>'fiscalYearId')))) WHERE (jsonb->>'transactionType')::text = 'Encumbrance' f transaction_payment_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS transaction_payment_idx_unique ON diku_mod_finance_storage.transaction (lower(f_unaccent(concat_space_sql(transaction.jsonb->>'amount' , transaction.jsonb->>'fromFundId' , transaction.jsonb->>'sourceInvoiceId' , transaction.jsonb->>'sourceInvoiceLineId' , transaction.jsonb->>'transactionType' , transaction.jsonb->>'expenseClassId')))) WHERE (jsonb->>'transactionType')::text = 'Payment' OR (jsonb->>'transactionType')::text = 'Pending payment' f transaction_credit_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS transaction_credit_idx_unique ON diku_mod_finance_storage.transaction (lower(f_unaccent(concat_space_sql(transaction.jsonb->>'amount' , transaction.jsonb->>'toFundId' , transaction.jsonb->>'sourceInvoiceId' , transaction.jsonb->>'sourceInvoiceLineId' , transaction.jsonb->>'transactionType' , transaction.jsonb->>'expenseClassId')))) WHERE (jsonb->>'transactionType')::text = 'Credit' f transaction_amount_idx_gin CREATE INDEX IF NOT EXISTS transaction_amount_idx_gin ON diku_mod_finance_storage.transaction USING GIN ((lower(f_unaccent(jsonb->>'amount'))) public.gin_trgm_ops) f groups_code_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS groups_code_idx_unique ON diku_mod_finance_storage.groups (lower(f_unaccent(jsonb->>'code'))) f groups_name_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS groups_name_idx_unique ON diku_mod_finance_storage.groups (lower(f_unaccent(jsonb->>'name'))) f groups_status_idx_gin CREATE INDEX IF NOT EXISTS groups_status_idx_gin ON diku_mod_finance_storage.groups USING GIN ((lower(f_unaccent(jsonb->>'status'))) public.gin_trgm_ops) f groups_acqUnitIds_idx_gin CREATE INDEX IF NOT EXISTS groups_acqUnitIds_idx_gin ON diku_mod_finance_storage.groups USING GIN ((lower(f_unaccent(jsonb->>'acqUnitIds'))) public.gin_trgm_ops) f group_fund_fiscal_year_groupId_fundId_fiscalYearId_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS group_fund_fiscal_year_groupId_fundId_fiscalYearId_idx_unique ON diku_mod_finance_storage.group_fund_fiscal_year (lower(f_unaccent(jsonb->>'groupId')) , lower(f_unaccent(jsonb->>'fundId')) , lower(f_unaccent(jsonb->>'fiscalYearId'))) f temporary_order_transactions_temp_order_tx_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS temporary_order_transactions_temp_order_tx_idx_unique ON diku_mod_finance_storage.temporary_order_transactions (lower(f_unaccent(concat_space_sql(temporary_order_transactions.jsonb->>'amount' , temporary_order_transactions.jsonb->>'fromFundId' , temporary_order_transactions.jsonb->'encumbrance'->>'sourcePurchaseOrderId' , temporary_order_transactions.jsonb->'encumbrance'->>'sourcePoLineId' , temporary_order_transactions.jsonb->'encumbrance'->>'initialAmountEncumbered' , temporary_order_transactions.jsonb->'encumbrance'->>'status' , temporary_order_transactions.jsonb->>'expenseClassId')))) f temporary_invoice_transactions_temp_invoice_tx_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS temporary_invoice_transactions_temp_invoice_tx_idx_unique ON diku_mod_finance_storage.temporary_invoice_transactions (concat_space_sql(lower(f_unaccent(jsonb->>'amount')) , lower(f_unaccent(jsonb->>'fromFundId')) , lower(f_unaccent(jsonb->>'sourceInvoiceId')) , lower(f_unaccent(jsonb->>'sourceInvoiceLineId')) , lower(f_unaccent(jsonb->>'toFundId')) , lower(f_unaccent(jsonb->>'transactionType')), lower(f_unaccent(jsonb->>'expenseClassId')))) f ledger_fiscal_year_rollover_ledgerId_fromFiscalYearId_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_ledgerId_fromFiscalYearId_idx_unique ON diku_mod_finance_storage.ledger_fiscal_year_rollover (lower(f_unaccent(concat_space_sql(ledger_fiscal_year_rollover.jsonb->>'ledgerId' , ledger_fiscal_year_rollover.jsonb->>'fromFiscalYearId')))) f ledger_fiscal_year_rollover_progress_overallRolloverStatus_idx CREATE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_progress_overallRolloverStatus_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress (left(lower(f_unaccent(jsonb->>'overallRolloverStatus')),600)) f ledger_fiscal_year_rollover_progress_ledgerRolloverId_idx_unique CREATE UNIQUE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_progress_ledgerRolloverId_idx_unique ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress (lower(f_unaccent(jsonb->>'ledgerRolloverId'))) f ledger_fiscal_year_rollover_error_details_purchaseOrderId_idx CREATE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_error_details_purchaseOrderId_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error (left(lower(f_unaccent(jsonb->'details'->>'purchaseOrderId')),600)) f ledger_fiscal_year_rollover_error_details_fundId_idx CREATE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_error_details_fundId_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error (left(lower(f_unaccent(jsonb->'details'->>'fundId')),600)) f ledger_fiscal_year_rollover_error_errorType_idx CREATE INDEX IF NOT EXISTS ledger_fiscal_year_rollover_error_errorType_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error (left(lower(f_unaccent(jsonb->>'errorType')),600)) f \. 10645.dat0000600 0004000 0002000 00000000005 14125567623 0014337 0ustar00postgrespostgres0000000 0000000 \. 10661.dat0000600 0004000 0002000 00000000005 14125567623 0014335 0ustar00postgrespostgres0000000 0000000 \. 10659.dat0000600 0004000 0002000 00000000005 14125567623 0014344 0ustar00postgrespostgres0000000 0000000 \. 10655.dat0000600 0004000 0002000 00000022570 14125567623 0014353 0ustar00postgrespostgres0000000 0000000 65eab5a6-016f-468d-8397-0c90e3dc2ca0 {"id": "65eab5a6-016f-468d-8397-0c90e3dc2ca0", "amount": 12230.8, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.272", "updatedDate": "2021-09-28T02:45:15.272+00:00"}, "toFundId": "67cd0046-e4f1-4e4f-9024-adf0b0039d09", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.272 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 67cd0046-e4f1-4e4f-9024-adf0b0039d09 \N 35e1f462-7f72-4ccd-83d1-4092b357c8e6 {"id": "35e1f462-7f72-4ccd-83d1-4092b357c8e6", "amount": 12000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.645", "updatedDate": "2021-09-28T02:45:15.645+00:00"}, "toFundId": "e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.645 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e e6d7e91a-4dbc-4a70-9b38-e000d2fbdc79 \N 471457c1-ef6c-4637-83d3-3984fa3471c2 {"id": "471457c1-ef6c-4637-83d3-3984fa3471c2", "amount": 50000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.709", "updatedDate": "2021-09-28T02:45:15.709+00:00"}, "toFundId": "d6f7c1ba-a237-465e-94ed-f37e91bc64bd", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.709 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e d6f7c1ba-a237-465e-94ed-f37e91bc64bd \N d5c4df84-0ea6-4035-902c-f47780d2597e {"id": "d5c4df84-0ea6-4035-902c-f47780d2597e", "amount": 23000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.742", "updatedDate": "2021-09-28T02:45:15.742+00:00"}, "toFundId": "55f48dc6-efa7-4cfe-bc7c-4786efe493e3", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.742 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 55f48dc6-efa7-4cfe-bc7c-4786efe493e3 \N 4ca003ab-e7fa-4fc9-9365-cfc66117e993 {"id": "4ca003ab-e7fa-4fc9-9365-cfc66117e993", "amount": 24000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.785", "updatedDate": "2021-09-28T02:45:15.785+00:00"}, "toFundId": "30fcc8e7-a019-43f4-b642-2edc389f4501", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.785 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 30fcc8e7-a019-43f4-b642-2edc389f4501 \N c5b8b0f4-47bd-4bef-8c2e-d219eb053386 {"id": "c5b8b0f4-47bd-4bef-8c2e-d219eb053386", "amount": 200000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.871", "updatedDate": "2021-09-28T02:45:15.871+00:00"}, "toFundId": "fb7b70f1-b898-4924-a991-0e4b6312bb5f", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.871 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e fb7b70f1-b898-4924-a991-0e4b6312bb5f \N 52f2e488-19de-4e82-9d5f-6d0d0592fcd3 {"id": "52f2e488-19de-4e82-9d5f-6d0d0592fcd3", "amount": 25000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.914", "updatedDate": "2021-09-28T02:45:15.914+00:00"}, "toFundId": "e9285a1c-1dfc-4380-868c-e74073003f43", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.914 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e e9285a1c-1dfc-4380-868c-e74073003f43 \N a0b1e290-c42f-435a-b9d7-4ae7f77eb4ef {"id": "a0b1e290-c42f-435a-b9d7-4ae7f77eb4ef", "amount": 21000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.973", "updatedDate": "2021-09-28T02:45:15.973+00:00"}, "toFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.973 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 7fbd5d84-62d1-44c6-9c45-6cb173998bbd \N 2880a6c0-3bd1-44c9-b1e3-d91e69b2077b {"id": "2880a6c0-3bd1-44c9-b1e3-d91e69b2077b", "amount": 25000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:15.993", "updatedDate": "2021-09-28T02:45:15.993+00:00"}, "toFundId": "e9f9bc2f-bad5-4613-9d6c-f55efa5805e7", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:15.993 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e e9f9bc2f-bad5-4613-9d6c-f55efa5805e7 \N 7468d9f1-26d1-498c-8129-b57c3a19732b {"id": "7468d9f1-26d1-498c-8129-b57c3a19732b", "amount": 28000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.022", "updatedDate": "2021-09-28T02:45:16.022+00:00"}, "toFundId": "6506b79b-7702-48b2-9774-a1c538fdd34e", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.022 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 6506b79b-7702-48b2-9774-a1c538fdd34e \N 5e09e729-9576-4cb6-9cc4-09cc5c6a2bb5 {"id": "5e09e729-9576-4cb6-9cc4-09cc5c6a2bb5", "amount": 30000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.062", "updatedDate": "2021-09-28T02:45:16.062+00:00"}, "toFundId": "65032151-39a5-4cef-8810-5350eb316300", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.062 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 65032151-39a5-4cef-8810-5350eb316300 \N 8d0f8ba1-d7cd-4ec3-a8a0-564f21d888d4 {"id": "8d0f8ba1-d7cd-4ec3-a8a0-564f21d888d4", "amount": 4000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.081", "updatedDate": "2021-09-28T02:45:16.081+00:00"}, "toFundId": "68872d8a-bf16-420b-829f-206da38f6c10", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.081 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 68872d8a-bf16-420b-829f-206da38f6c10 \N 8de9e056-6316-45ca-890a-b5c3f030b2c9 {"id": "8de9e056-6316-45ca-890a-b5c3f030b2c9", "amount": 35000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.119", "updatedDate": "2021-09-28T02:45:16.119+00:00"}, "toFundId": "a89eccf0-57a6-495e-898d-32b9b2210f2f", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.119 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e a89eccf0-57a6-495e-898d-32b9b2210f2f \N 33c942ef-144d-4b3b-b8dc-f2695c57d8da {"id": "33c942ef-144d-4b3b-b8dc-f2695c57d8da", "amount": 201000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.146", "updatedDate": "2021-09-28T02:45:16.146+00:00"}, "toFundId": "1714f71f-b845-444b-a79e-a577487a6f7d", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.146 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 1714f71f-b845-444b-a79e-a577487a6f7d \N 1295e48b-b123-4e4a-ac56-1ef5ddf521d0 {"id": "1295e48b-b123-4e4a-ac56-1ef5ddf521d0", "amount": 400000.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.203", "updatedDate": "2021-09-28T02:45:16.203+00:00"}, "toFundId": "4428a37c-8bae-4f0d-865d-970d83d5ad55", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Allocation", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.203 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 4428a37c-8bae-4f0d-865d-970d83d5ad55 \N e24d0bae-0528-403d-8ce2-0d821a6e57e7 {"id": "e24d0bae-0528-403d-8ce2-0d821a6e57e7", "amount": 2500.0, "source": "User", "currency": "USD", "metadata": {"createdDate": "2021-09-28T02:45:16.235", "updatedDate": "2021-09-28T02:45:16.235+00:00"}, "toFundId": "69640328-788e-43fc-9c3c-af39e243f3b7", "fromFundId": "7fbd5d84-62d1-44c6-9c45-6cb173998bbd", "description": "PO_Line: History of Incas", "fiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e", "transactionType": "Transfer", "sourceFiscalYearId": "684b5dc5-92f6-4db7-b996-b549d88f5e4e"} 2021-09-28 02:45:16.235 \N 684b5dc5-92f6-4db7-b996-b549d88f5e4e 7fbd5d84-62d1-44c6-9c45-6cb173998bbd 684b5dc5-92f6-4db7-b996-b549d88f5e4e 69640328-788e-43fc-9c3c-af39e243f3b7 \N \. restore.sql0000600 0004000 0002000 00000434773 14125567623 0015421 0ustar00postgrespostgres0000000 0000000 -- -- NOTE: -- -- File paths need to be edited. Search for $$PATH$$ and -- replace it with the path to the directory containing -- the extracted data files. -- -- -- PostgreSQL database dump -- -- Dumped from database version 12.8 (Ubuntu 12.8-1.pgdg20.04+1) -- Dumped by pg_dump version 13.3 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; DROP DATABASE okapi_modules; -- -- Name: okapi_modules; Type: DATABASE; Schema: -; Owner: folio_admin -- CREATE DATABASE okapi_modules WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'en_US.UTF-8'; ALTER DATABASE okapi_modules OWNER TO folio_admin; \connect okapi_modules SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- Name: diku_mod_finance_storage; Type: SCHEMA; Schema: -; Owner: diku_mod_finance_storage -- CREATE SCHEMA diku_mod_finance_storage; ALTER SCHEMA diku_mod_finance_storage OWNER TO diku_mod_finance_storage; -- -- Name: budget_encumbrances_rollover(jsonb); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.budget_encumbrances_rollover(_rollover_record jsonb) RETURNS void LANGUAGE plpgsql AS $$ DECLARE toFiscalYear jsonb; fromFiscalYear jsonb; temprow record; BEGIN SELECT INTO toFiscalYear (jsonb::jsonb) FROM diku_mod_finance_storage.fiscal_year WHERE _rollover_record->>'toFiscalYearId'=jsonb->>'id'; SELECT INTO fromFiscalYear (jsonb::jsonb) FROM diku_mod_finance_storage.fiscal_year WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'id'; -- #1 Upsert budgets INSERT INTO diku_mod_finance_storage.budget ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER5', budget.id, fund.id)), diku_mod_finance_storage.build_budget(budget.jsonb, fund.jsonb, _rollover_record, toFiscalYear) FROM diku_mod_finance_storage.budget AS budget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id=budget.fundId WHERE fund.jsonb->>'fundStatus'<>'Inactive' AND budget.jsonb->>'fiscalYearId'=_rollover_record->>'fromFiscalYearId' AND fund.jsonb->>'ledgerId'=_rollover_record->>'ledgerId' ) ON CONFLICT (lower(diku_mod_finance_storage.f_unaccent(jsonb ->> 'fundId'::text)), lower(diku_mod_finance_storage.f_unaccent(jsonb ->> 'fiscalYearId'::text))) DO UPDATE SET jsonb=diku_mod_finance_storage.budget.jsonb || jsonb_build_object ( 'allocationTo', (diku_mod_finance_storage.budget.jsonb->>'allocationTo')::decimal + (EXCLUDED.jsonb->>'initialAllocation')::decimal, 'netTransfers', (diku_mod_finance_storage.budget.jsonb->>'netTransfers')::decimal + (EXCLUDED.jsonb->>'netTransfers')::decimal, 'metadata', diku_mod_finance_storage.budget.jsonb->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)); -- #1.1 Create budget expense class relations for new budgets INSERT INTO diku_mod_finance_storage.budget_expense_class SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER6', oldBudget.id, fund.id, newBudget.id, exp.id)), jsonb_build_object('budgetId', newBudget.id, 'expenseClassId', exp.jsonb->>'expenseClassId', 'status', exp.jsonb->>'status') FROM diku_mod_finance_storage.budget AS oldBudget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget AS newBudget ON newBudget.fundId = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget_expense_class AS exp ON oldBudget.id = exp.budgetid WHERE oldBudget.jsonb ->> 'fiscalYearId' = _rollover_record->>'fromFiscalYearId' AND fund.jsonb ->> 'ledgerId' = _rollover_record->>'ledgerId' AND newBudget.jsonb->>'fiscalYearId' = _rollover_record->>'toFiscalYearId' ON CONFLICT DO NOTHING; -- #1.2 Create budget groups relation for new budgets INSERT INTO diku_mod_finance_storage.group_fund_fiscal_year SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER7', oldBudget.id, fund.id, newBudget.id, gr.id)), jsonb_build_object('budgetId', newBudget.id, 'groupId', gr.jsonb->>'groupId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'fundId', gr.jsonb->>'fundId') FROM diku_mod_finance_storage.budget AS oldBudget INNER JOIN diku_mod_finance_storage.fund AS fund ON fund.id = oldBudget.fundId INNER JOIN diku_mod_finance_storage.budget AS newBudget ON newBudget.fundId = oldBudget.fundId INNER JOIN diku_mod_finance_storage.group_fund_fiscal_year AS gr ON oldBudget.id = gr.budgetid WHERE oldBudget.jsonb ->> 'fiscalYearId' = _rollover_record->>'fromFiscalYearId' AND fund.jsonb ->> 'ledgerId' = _rollover_record->>'ledgerId' AND newBudget.jsonb->>'fiscalYearId' = _rollover_record->>'toFiscalYearId' ON CONFLICT DO NOTHING; -- #2 Create allocations INSERT INTO diku_mod_finance_storage.transaction ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER8', budget.jsonb->>'id')), jsonb_build_object('toFundId', budget.jsonb->>'fundId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'transactionType', 'Allocation', 'source', 'User', 'currency', toFiscalYear->>'currency', 'amount', (budget.jsonb->>'initialAllocation')::decimal+ (budget.jsonb->>'allocationTo')::decimal- (budget.jsonb->>'allocationFrom')::decimal- sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)) FROM diku_mod_finance_storage.budget AS budget LEFT JOIN diku_mod_finance_storage.transaction AS tr_to ON budget.fundId=tr_to.toFundId AND budget.fiscalYearId=tr_to.fiscalYearId AND tr_to.jsonb->>'transactionType'='Allocation' LEFT JOIN diku_mod_finance_storage.transaction AS tr_from ON budget.fundId=tr_from.fromFundId AND budget.fiscalYearId=tr_from.fiscalYearId AND tr_from.jsonb->>'transactionType'='Allocation' WHERE budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' GROUP BY budget.jsonb HAVING (budget.jsonb->>'initialAllocation')::decimal+(budget.jsonb->>'allocationTo')::decimal-(budget.jsonb->>'allocationFrom')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)) <> 0 ); -- #3 Create transfers INSERT INTO diku_mod_finance_storage.transaction ( SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER9', budget.jsonb->>'id')), jsonb_build_object('toFundId', budget.jsonb->>'fundId', 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'transactionType', 'Rollover transfer', 'source', 'User', 'currency', toFiscalYear->>'currency', 'amount', (budget.jsonb->>'netTransfers')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text)) FROM diku_mod_finance_storage.budget AS budget LEFT JOIN diku_mod_finance_storage.transaction AS tr_to ON budget.fundId=tr_to.toFundId AND budget.fiscalYearId=tr_to.fiscalYearId AND tr_to.jsonb->>'transactionType'='Transfer' LEFT JOIN diku_mod_finance_storage.transaction AS tr_from ON budget.fundId=tr_from.fromFundId AND budget.fiscalYearId=tr_from.fiscalYearId AND tr_from.jsonb->>'transactionType'='Transfer' WHERE budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' GROUP BY budget.jsonb HAVING (budget.jsonb->>'netTransfers')::decimal-sum(COALESCE((tr_to.jsonb->>'amount')::decimal, 0.00))+sum(COALESCE((tr_from.jsonb->>'amount')::decimal, 0.00)) <> 0 ); -- #4 sort order ids FOR temprow IN SELECT min(tr.jsonb->'metadata'->>'createdDate') date, tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId' order_id FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId LEFT JOIN diku_mod_finance_storage.ledger ledger ON ledger.id=fund.ledgerId WHERE tr.jsonb->>'transactionType' = 'Encumbrance' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND tr.jsonb->'encumbrance'->>'orderStatus' = 'Open' AND (tr.jsonb->'encumbrance'->>'reEncumber')::boolean AND ledger.id::text=_rollover_record->>'ledgerId' GROUP BY order_id ORDER BY date LOOP PERFORM diku_mod_finance_storage.rollover_order(temprow.order_id::text, _rollover_record); END LOOP; END; $$; ALTER FUNCTION diku_mod_finance_storage.budget_encumbrances_rollover(_rollover_record jsonb) OWNER TO folio_admin; -- -- Name: budget_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.budget_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.budget_set_md() OWNER TO folio_admin; -- -- Name: build_budget(jsonb, jsonb, jsonb, jsonb); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.build_budget(_budget jsonb, _fund jsonb, _rollover_record jsonb, _fiscal_year jsonb) RETURNS jsonb LANGUAGE plpgsql AS $$ DECLARE budget_rollover jsonb; newAllocated decimal; newNetTransfers decimal; allocated decimal; totalFunding decimal; available decimal; unavailable decimal; allowableEncumbrance decimal; allowableExpenditure decimal; metadata jsonb; result_budget jsonb; BEGIN SELECT br INTO budget_rollover FROM jsonb_array_elements(_rollover_record->'budgetsRollover') br WHERE br->>'fundTypeId'=_fund->>'fundTypeId' OR (NOT br ? 'fundTypeId' AND NOT _fund ? 'fundTypeId'); allocated := (_budget->>'initialAllocation')::decimal + (_budget->>'allocationTo')::decimal - (_budget->>'allocationFrom')::decimal; totalFunding := allocated + (_budget->>'netTransfers')::decimal; unavailable := (_budget->>'encumbered')::decimal + (_budget->>'expenditures')::decimal + (_budget->>'awaitingPayment')::decimal; available := totalFunding - unavailable; IF (budget_rollover->>'rolloverAllocation')::boolean THEN newAllocated := allocated; ELSE newAllocated := 0; END IF; IF (budget_rollover->>'rolloverAvailable')::boolean THEN newNetTransfers := available; ELSE newNetTransfers := 0; END IF; IF (budget_rollover->>'setAllowances')::boolean THEN allowableEncumbrance := budget_rollover->>'allowableEncumbrance'; allowableExpenditure := budget_rollover->>'allowableExpenditure'; ELSE allowableEncumbrance := _budget->>'allowableEncumbrance'; allowableExpenditure := _budget->>'allowableExpenditure'; END IF; newAllocated := newAllocated + CASE WHEN budget_rollover ? 'adjustAllocation' AND (budget_rollover->>'rolloverAllocation')::boolean THEN allocated*(budget_rollover->>'adjustAllocation')::decimal/100 ELSE 0 END; IF budget_rollover->>'addAvailableTo'='Allocation' THEN newAllocated := newAllocated + newNetTransfers; newNetTransfers := 0; END IF; metadata := _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text); result_budget := (_budget - 'id' - 'allowableEncumbrance' - 'allowableExpenditure') || jsonb_build_object ( 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'name', (_fund->>'code') || '-' || (_fiscal_year->>'code'), 'initialAllocation', newAllocated, 'allocationTo', 0, 'allocationFrom', 0, 'metadata', metadata, 'budgetStatus', 'Active', 'netTransfers', newNetTransfers, 'awaitingPayment', 0, 'encumbered', 0, 'expenditures', 0 ); IF allowableEncumbrance is not null THEN result_budget := result_budget || jsonb_build_object('allowableEncumbrance', allowableEncumbrance); END IF; IF allowableExpenditure is not null THEN result_budget := result_budget || jsonb_build_object('allowableExpenditure', allowableExpenditure); END IF; RETURN result_budget; END; $$; ALTER FUNCTION diku_mod_finance_storage.build_budget(_budget jsonb, _fund jsonb, _rollover_record jsonb, _fiscal_year jsonb) OWNER TO folio_admin; -- -- Name: calculate_planned_encumbrance_amount(jsonb, jsonb, boolean); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.calculate_planned_encumbrance_amount(_transaction jsonb, _rollover_record jsonb, _rounding boolean) RETURNS numeric LANGUAGE plpgsql AS $$ DECLARE amount DECIMAL DEFAULT 0; encumbrance_rollover jsonb DEFAULT null; po_line_cost DECIMAL DEFAULT 0; total_amount DECIMAL DEFAULT 0; distribution_value DECIMAL DEFAULT 0; BEGIN SELECT sum((jsonb->'encumbrance'->>'initialAmountEncumbered')::decimal) INTO po_line_cost FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; distribution_value := 0; IF po_line_cost > 0 THEN distribution_value := (_transaction->'encumbrance'->>'initialAmountEncumbered')::decimal/po_line_cost; END IF; IF _transaction->'encumbrance'->>'orderType'='Ongoing' AND (_transaction->'encumbrance'->>'subscription')::boolean THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='Ongoing-Subscription'; ELSIF _transaction->'encumbrance'->>'orderType'='Ongoing' THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='Ongoing'; ELSIF _transaction->'encumbrance'->>'orderType'='One-Time' THEN SELECT INTO encumbrance_rollover (er::jsonb) FROM jsonb_array_elements(_rollover_record->'encumbrancesRollover') er WHERE er->>'orderType'='One-time'; END IF; IF encumbrance_rollover->>'basedOn'='Expended' THEN SELECT sum((jsonb->'encumbrance'->>'amountExpended')::decimal) INTO total_amount FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; ELSE SELECT sum((jsonb->>'amount')::decimal) INTO total_amount FROM diku_mod_finance_storage.transaction WHERE _rollover_record->>'fromFiscalYearId'=jsonb->>'fiscalYearId' AND jsonb->'encumbrance'->>'sourcePoLineId'=_transaction->'encumbrance'->>'sourcePoLineId' GROUP BY jsonb->'encumbrance'->>'sourcePoLineId'; END IF; total_amount:= total_amount + total_amount * (encumbrance_rollover->>'increaseBy')::decimal/100; amount := total_amount * distribution_value; IF _rounding IS NOT NULL AND _rounding THEN RETURN ROUND(amount,(_rollover_record->>'currencyFactor')::integer); ELSE RETURN amount; END IF; END; $$; ALTER FUNCTION diku_mod_finance_storage.calculate_planned_encumbrance_amount(_transaction jsonb, _rollover_record jsonb, _rounding boolean) OWNER TO folio_admin; -- -- Name: concat_array_object(jsonb); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.concat_array_object(jsonb_array jsonb) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value::text, ' ') FROM jsonb_array_elements_text($1); $_$; ALTER FUNCTION diku_mod_finance_storage.concat_array_object(jsonb_array jsonb) OWNER TO folio_admin; -- -- Name: concat_array_object_values(jsonb, text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1); $_$; ALTER FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text) OWNER TO folio_admin; -- -- Name: concat_array_object_values(jsonb, text, text, text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT string_agg(value->>$2, ' ') FROM jsonb_array_elements($1) WHERE value->>$3 = $4; $_$; ALTER FUNCTION diku_mod_finance_storage.concat_array_object_values(jsonb_array jsonb, field text, filterkey text, filtervalue text) OWNER TO folio_admin; -- -- Name: concat_space_sql(text[]); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.concat_space_sql(VARIADIC text[]) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ select concat_ws(' ', VARIADIC $1); $_$; ALTER FUNCTION diku_mod_finance_storage.concat_space_sql(VARIADIC text[]) OWNER TO folio_admin; -- -- Name: count_estimate(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.count_estimate(query text) RETURNS bigint LANGUAGE plpgsql STABLE STRICT AS $$ DECLARE count bigint; est_count bigint; q text; BEGIN est_count = diku_mod_finance_storage.count_estimate_smart2(20000, 20000, query); IF est_count > 4*20000 THEN RETURN est_count; END IF; q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 20000) x'; EXECUTE q INTO count; IF count < 20000 THEN RETURN count; END IF; IF est_count < 20000 THEN RETURN 20000; END IF; RETURN est_count; END; $$; ALTER FUNCTION diku_mod_finance_storage.count_estimate(query text) OWNER TO folio_admin; -- -- Name: count_estimate_default(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.count_estimate_default(query text) RETURNS bigint LANGUAGE plpgsql IMMUTABLE STRICT AS $$ DECLARE rows bigint; q text; BEGIN q = 'SELECT COUNT(*) FROM (' || query || ' LIMIT 20000) x'; EXECUTE q INTO rows; IF rows < 20000 THEN return rows; END IF; rows = diku_mod_finance_storage.count_estimate_smart2(20000, 20000, query); IF rows < 20000 THEN return 20000; END IF; RETURN rows; END; $$; ALTER FUNCTION diku_mod_finance_storage.count_estimate_default(query text) OWNER TO folio_admin; -- -- Name: count_estimate_smart2(bigint, bigint, text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.count_estimate_smart2(rows bigint, lim bigint, query text) RETURNS bigint LANGUAGE plpgsql STRICT AS $$ DECLARE rec record; cnt bigint; BEGIN IF rows = lim THEN FOR rec IN EXECUTE 'EXPLAIN ' || query LOOP cnt := substring(rec."QUERY PLAN" FROM ' rows=([[:digit:]]+)'); EXIT WHEN cnt IS NOT NULL; END LOOP; RETURN cnt; END IF; RETURN rows; END; $$; ALTER FUNCTION diku_mod_finance_storage.count_estimate_smart2(rows bigint, lim bigint, query text) OWNER TO folio_admin; -- -- Name: f_unaccent(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.f_unaccent(text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT public.unaccent('public.unaccent', $1) -- schema-qualify function and dictionary $_$; ALTER FUNCTION diku_mod_finance_storage.f_unaccent(text) OWNER TO folio_admin; -- -- Name: first_array_object_value(jsonb, text, text, text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.first_array_object_value(jsonb_array jsonb, field text, filterkey text, filtervalue text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT value->>$2 FROM jsonb_array_elements($1) WHERE value->>$3 = $4 LIMIT 1; $_$; ALTER FUNCTION diku_mod_finance_storage.first_array_object_value(jsonb_array jsonb, field text, filterkey text, filtervalue text) OWNER TO folio_admin; -- -- Name: fiscal_year_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.fiscal_year_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.fiscal_year_set_md() OWNER TO folio_admin; -- -- Name: fund_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.fund_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.fund_set_md() OWNER TO folio_admin; -- -- Name: get_tsvector(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.get_tsvector(text) RETURNS tsvector LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT to_tsvector('simple', translate($1, '&', ',')); $_$; ALTER FUNCTION diku_mod_finance_storage.get_tsvector(text) OWNER TO folio_admin; -- -- Name: groups_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.groups_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.groups_set_md() OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover_error_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md() OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover_progress_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md() OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md() OWNER TO folio_admin; -- -- Name: ledger_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.ledger_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.ledger_set_md() OWNER TO folio_admin; -- -- Name: next_uuid(uuid); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.next_uuid(uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ DECLARE uuid text; digit text; BEGIN uuid = $1; FOR i IN REVERSE 36..1 LOOP digit := substring(uuid from i for 1); -- skip minus, version byte M and variant byte N CONTINUE WHEN digit = '-' OR i = 15 OR i = 20; CASE digit WHEN '0' THEN digit := '1'; WHEN '1' THEN digit := '2'; WHEN '2' THEN digit := '3'; WHEN '3' THEN digit := '4'; WHEN '4' THEN digit := '5'; WHEN '5' THEN digit := '6'; WHEN '6' THEN digit := '7'; WHEN '7' THEN digit := '8'; WHEN '8' THEN digit := '9'; WHEN '9' THEN digit := 'a'; WHEN 'a' THEN digit := 'b'; WHEN 'b' THEN digit := 'c'; WHEN 'c' THEN digit := 'd'; WHEN 'd' THEN digit := 'e'; WHEN 'e' THEN digit := 'f'; WHEN 'f' THEN digit := '0'; ELSE NULL; END CASE; uuid = overlay(uuid placing digit from i); EXIT WHEN digit <> '0'; END LOOP; RETURN uuid; END; $_$; ALTER FUNCTION diku_mod_finance_storage.next_uuid(uuid) OWNER TO folio_admin; -- -- Name: normalize_digits(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.normalize_digits(text) RETURNS text LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT translate((regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1], E' \t-', '') || CASE WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[1] = '' THEN '' WHEN (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2] = '' THEN '' ELSE ' ' END || (regexp_match($1, '^([0-9 \t-]*(?:\*[ \t]*)?)(.*)'))[2]; $_$; ALTER FUNCTION diku_mod_finance_storage.normalize_digits(text) OWNER TO folio_admin; -- -- Name: rmb_internal_index(text, text, text, text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.rmb_internal_index(atable text, aname text, tops text, newdef text) RETURNS void LANGUAGE plpgsql AS $_$ DECLARE olddef text; namep CONSTANT text = concat(aname, '_p'); prepareddef text; BEGIN IF tops = 'DELETE' THEN -- use case insensitive %s, not case sensitive %I -- no SQL injection because the names are hard-coded in schema.json EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE 'DELETE FROM diku_mod_finance_storage.rmb_internal_index WHERE name = $1' USING aname; RETURN; END IF; SELECT def INTO olddef FROM diku_mod_finance_storage.rmb_internal_index WHERE name = aname; SELECT def INTO prepareddef FROM diku_mod_finance_storage.rmb_internal_index WHERE name = namep; prepareddef = replace(prepareddef, concat(' ', namep, ' ON '), concat(' ', aname, ' ON ')); IF prepareddef = newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE format('ALTER INDEX IF EXISTS %s RENAME TO %s', namep, aname); EXECUTE 'DELETE FROM rmb_internal_index WHERE name = $1' USING namep; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; ELSIF olddef IS DISTINCT FROM newdef THEN EXECUTE format('DROP INDEX IF EXISTS %s', aname); EXECUTE newdef; EXECUTE 'INSERT INTO rmb_internal_analyze VALUES ($1)' USING atable; END IF; EXECUTE 'INSERT INTO diku_mod_finance_storage.rmb_internal_index VALUES ($1, $2, FALSE) ' 'ON CONFLICT (name) DO UPDATE SET def = EXCLUDED.def, remove = EXCLUDED.remove' USING aname, newdef; END $_$; ALTER FUNCTION diku_mod_finance_storage.rmb_internal_index(atable text, aname text, tops text, newdef text) OWNER TO folio_admin; -- -- Name: rollover_order(text, jsonb); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.rollover_order(_order_id text, _rollover_record jsonb) RETURNS void LANGUAGE plpgsql AS $$ DECLARE missing_penny_with_po_line refcursor; missing_penny_row record; missing_penny_transaction_id text; BEGIN -- #9 create encumbrances to temp table CREATE TEMPORARY TABLE tmp_transaction(LIKE diku_mod_finance_storage.transaction); INSERT INTO tmp_transaction(id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER1', tr.id)), jsonb - 'id' || jsonb_build_object ( 'fiscalYearId', _rollover_record->>'toFiscalYearId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'encumbrance', jsonb->'encumbrance' || jsonb_build_object ( 'initialAmountEncumbered', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'amountAwaitingPayment', 0, 'amountExpended', 0 ), 'metadata', _rollover_record->'metadata' || jsonb_build_object('createdDate', date_trunc('milliseconds', clock_timestamp())::text) ) FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id AND tr.jsonb->>'fiscalYearId'=_rollover_record->>'fromFiscalYearId' AND (tr.jsonb->'encumbrance'->>'reEncumber')::boolean AND tr.jsonb->'encumbrance'->>'orderStatus'='Open'; -- #9.1 calculate and add missing penny to appropriate temp transaction -- find poLines and calculate missing penny amount for that poLine if any OPEN missing_penny_with_po_line FOR SELECT po.id as po_line_id, (round((SELECT sum(diku_mod_finance_storage.calculate_planned_encumbrance_amount(jsonb, _rollover_record, false)) - sum(diku_mod_finance_storage.calculate_planned_encumbrance_amount(jsonb, _rollover_record, true)) penny FROM diku_mod_finance_storage.transaction WHERE _rollover_record ->> 'fromFiscalYearId' = jsonb ->> 'fiscalYearId' AND jsonb -> 'encumbrance' ->> 'sourcePoLineId' = po.id GROUP BY jsonb -> 'encumbrance' ->> 'sourcePoLineId'), (_rollover_record ->> 'currencyFactor')::integer)) as penny FROM ( SELECT DISTINCT tr.jsonb -> 'encumbrance' ->> 'sourcePoLineId' as id FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb -> 'encumbrance' ->> 'sourcePurchaseOrderId' = _order_id AND _rollover_record ->> 'fromFiscalYearId' = jsonb ->> 'fiscalYearId' ) po; -- if missing penny for poLines exist then find transaction (first or last) and add that missing amount to them LOOP FETCH missing_penny_with_po_line INTO missing_penny_row; EXIT WHEN NOT found; IF missing_penny_row.penny IS NOT NULL AND missing_penny_row.penny != 0 THEN missing_penny_transaction_id := ( SELECT id FROM tmp_transaction WHERE _rollover_record ->> 'toFiscalYearId' = jsonb ->> 'fiscalYearId' AND jsonb -> 'encumbrance' ->> 'sourcePoLineId' = missing_penny_row.po_line_id ORDER BY CASE WHEN missing_penny_row.penny < 0 THEN jsonb -> 'metadata' ->> 'createdDate' END, CASE WHEN missing_penny_row.penny > 0 THEN jsonb -> 'metadata' ->> 'createdDate' END DESC LIMIT 1 ); IF missing_penny_transaction_id IS NOT NULL THEN UPDATE tmp_transaction as tr SET jsonb = jsonb_set( jsonb || jsonb_build_object('amount', (jsonb ->> 'amount')::decimal + missing_penny_row.penny), '{encumbrance,initialAmountEncumbered}', ((jsonb -> 'encumbrance' ->> 'initialAmountEncumbered')::decimal + missing_penny_row.penny)::text::jsonb) WHERE missing_penny_transaction_id = id::text; END IF; END IF; END LOOP; CLOSE missing_penny_with_po_line; IF -- #5 EXISTS (SELECT * FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId LEFT JOIN diku_mod_finance_storage.ledger_fiscal_year_rollover rollover ON rollover.ledgerId = fund.ledgerId LEFT JOIN diku_mod_finance_storage.ledger_fiscal_year_rollover_progress rollover_progress ON rollover.id = rollover_progress.ledgerRolloverId WHERE fund.ledgerId::text<>_rollover_record->>'ledgerId' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND (rollover_progress.jsonb IS NULL OR rollover_progress.jsonb->>'overallRolloverStatus'='Not Started' OR rollover_progress.jsonb->>'overallRolloverStatus'='In Progress') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id) THEN -- #6 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER2', tr.id, fund.id)), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Part of the encumbrances belong to the ledger, which has not been rollovered', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.fromFundId::text ) ) FROM diku_mod_finance_storage.transaction tr LEFT JOIN diku_mod_finance_storage.fund fund ON fund.id = tr.fromFundId WHERE fund.ledgerId::text=_rollover_record->>'ledgerId' AND tr.fiscalYearId::text = _rollover_record->>'fromFiscalYearId' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id; ELSEIF -- #10 EXISTS (SELECT tr.jsonb as transaction FROM diku_mod_finance_storage.transaction tr WHERE NOT EXISTS (SELECT * FROM diku_mod_finance_storage.budget budget WHERE tr.fromFundId=budget.fundId AND budget.fiscalYearId::text = _rollover_record->>'toFiscalYearId') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'= _order_id AND tr.fiscalYearId::text= _rollover_record->>'fromFiscalYearId') THEN -- #11 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER3', tr.id)), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Budget not found', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.jsonb->>'fromFundId' ) ) FROM diku_mod_finance_storage.transaction tr WHERE NOT EXISTS (SELECT * FROM diku_mod_finance_storage.budget budget WHERE tr.fromFundId=budget.fundId AND budget.fiscalYearId::text = _rollover_record->>'toFiscalYearId') AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'= _order_id AND tr.fiscalYearId::text= _rollover_record->>'fromFiscalYearId'; ELSEIF -- #7 (_rollover_record->>'restrictEncumbrance')::boolean AND EXISTS (SELECT sum((tr.jsonb->>'amount')::decimal) FROM tmp_transaction tr LEFT JOIN diku_mod_finance_storage.budget budget ON tr.jsonb->>'fromFundId' = budget.fundId::text WHERE budget.jsonb ->> 'allowableEncumbrance' IS NOT NULL AND tr.jsonb -> 'encumbrance' ->> 'sourcePurchaseOrderId' = _order_id AND tr.jsonb->>'fiscalYearId' = _rollover_record ->> 'toFiscalYearId' AND budget.fiscalYearId::text = _rollover_record ->> 'toFiscalYearId' GROUP BY budget.jsonb, tr.jsonb ->> 'fromFundId' HAVING sum((tr.jsonb->>'amount')::decimal) > ((budget.jsonb->>'initialAllocation')::decimal + (budget.jsonb->>'allocationTo')::decimal - (budget.jsonb->>'allocationFrom')::decimal + (budget.jsonb->>'netTransfers')::decimal) * (budget.jsonb->>'allowableEncumbrance')::decimal/100 - (budget.jsonb->>'encumbered')::decimal) THEN -- #8 INSERT INTO diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb) SELECT public.uuid_generate_v5(public.uuid_nil(), concat('BER4', tr.id, summary.budget->>'id')), jsonb_build_object ( 'ledgerRolloverId', _rollover_record->>'id', 'errorType', 'Order', 'failedAction', 'Create encumbrance', 'errorMessage', 'Insufficient funds', 'details', jsonb_build_object ( 'purchaseOrderId', _order_id, 'poLineId', tr.jsonb->'encumbrance'->>'sourcePoLineId', 'amount', diku_mod_finance_storage.calculate_planned_encumbrance_amount(tr.jsonb, _rollover_record, true), 'fundId', tr.jsonb->>'fromFundId' ) ) FROM diku_mod_finance_storage.transaction tr INNER JOIN ( SELECT budget.jsonb AS budget FROM tmp_transaction tr LEFT JOIN diku_mod_finance_storage.budget budget ON tr.jsonb->>'fromFundId'=budget.fundId::text WHERE budget.jsonb->>'allowableEncumbrance' IS NOT NULL AND tr.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' AND budget.fiscalYearId::text=_rollover_record->>'toFiscalYearId' GROUP BY tr.jsonb->>'fromFundId', budget.jsonb HAVING sum((tr.jsonb->>'amount')::decimal) > ((budget.jsonb->>'initialAllocation')::decimal + (budget.jsonb->>'allocationTo')::decimal - (budget.jsonb->>'allocationFrom')::decimal + (budget.jsonb->>'netTransfers')::decimal) * (budget.jsonb->>'allowableEncumbrance')::decimal/100 - (budget.jsonb->>'encumbered')::decimal ) as summary ON summary.budget->>'fundId'=tr.jsonb->>'fromFundId' WHERE tr.jsonb->>'transactionType'='Encumbrance' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id AND tr.fiscalYearId::text=_rollover_record->>'fromFiscalYearId'; ELSE -- #9.2 move transactions from temp table to permanent INSERT INTO diku_mod_finance_storage.transaction SELECT * FROM tmp_transaction; END IF; -- #10 update budget amounts UPDATE diku_mod_finance_storage.budget as budget SET jsonb = budget.jsonb || jsonb_build_object('encumbered', (budget.jsonb->>'encumbered')::decimal + subquery.amount) FROM ( SELECT tr.jsonb->>'fromFundId' as fund_id, sum((tr.jsonb->>'amount')::decimal) AS amount FROM diku_mod_finance_storage.transaction tr WHERE tr.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId' AND tr.jsonb->'encumbrance'->>'sourcePurchaseOrderId'=_order_id GROUP BY tr.jsonb->>'fromFundId' ) AS subquery LEFT JOIN diku_mod_finance_storage.fund fund ON subquery.fund_id=fund.id::text WHERE subquery.fund_id=budget.jsonb->>'fundId' AND fund.jsonb->>'ledgerId'=_rollover_record->>'ledgerId' AND budget.jsonb->>'fiscalYearId'=_rollover_record->>'toFiscalYearId'; DROP TABLE IF EXISTS tmp_transaction; END; $$; ALTER FUNCTION diku_mod_finance_storage.rollover_order(_order_id text, _rollover_record jsonb) OWNER TO folio_admin; -- -- Name: set_budget_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_budget_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_budget_md_json() OWNER TO folio_admin; -- -- Name: set_fiscal_year_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json() OWNER TO folio_admin; -- -- Name: set_fund_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_fund_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_fund_md_json() OWNER TO folio_admin; -- -- Name: set_groups_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_groups_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_groups_md_json() OWNER TO folio_admin; -- -- Name: set_id_in_jsonb(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_id_in_jsonb() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.jsonb = jsonb_set(NEW.jsonb, '{id}', to_jsonb(NEW.id)); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_id_in_jsonb() OWNER TO folio_admin; -- -- Name: set_ledger_fiscal_year_rollover_error_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json() OWNER TO folio_admin; -- -- Name: set_ledger_fiscal_year_rollover_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json() OWNER TO folio_admin; -- -- Name: set_ledger_fiscal_year_rollover_progress_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json() OWNER TO folio_admin; -- -- Name: set_ledger_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_ledger_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_ledger_md_json() OWNER TO folio_admin; -- -- Name: set_transaction_md_json(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.set_transaction_md_json() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN if NEW.creation_date IS NULL then RETURN NEW; end if; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(NEW.creation_date)); if NEW.created_by IS NULL then NEW.jsonb = NEW.jsonb #- '{metadata,createdByUserId}'; else NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdByUserId}', to_jsonb(NEW.created_by)); end if; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.set_transaction_md_json() OWNER TO folio_admin; -- -- Name: transaction_set_md(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.transaction_set_md() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE input text; createdDate timestamp; BEGIN input = NEW.jsonb->'metadata'->>'createdDate'; IF input IS NULL THEN RETURN NEW; END IF; -- time stamp without time zone? IF (input::timestamp::timestamptz = input::timestamptz) THEN -- createdDate already has no time zone, normalize using ::timestamp createdDate = input::timestamp; ELSE -- createdDate has a time zone string -- normalize using ::timestamptz, convert to '+00' time zone and remove time zone string createdDate = input::timestamptz AT TIME ZONE '+00'; END IF; NEW.jsonb = jsonb_set(NEW.jsonb, '{metadata,createdDate}', to_jsonb(createdDate)); NEW.creation_date = createdDate; NEW.created_by = NEW.jsonb->'metadata'->>'createdByUserId'; RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.transaction_set_md() OWNER TO folio_admin; -- -- Name: tsquery_and(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.tsquery_and(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT to_tsquery('simple', string_agg(CASE WHEN length(v) = 0 OR v = '*' THEN '' WHEN right(v, 1) = '*' THEN '''' || left(v, -1) || ''':*' ELSE '''' || v || '''' END, '&')) FROM (SELECT regexp_split_to_table(translate($1, '&''', ',,'), ' +')) AS x(v); $_$; ALTER FUNCTION diku_mod_finance_storage.tsquery_and(text) OWNER TO folio_admin; -- -- Name: tsquery_or(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.tsquery_or(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT replace(diku_mod_finance_storage.tsquery_and($1)::text, '&', '|')::tsquery; $_$; ALTER FUNCTION diku_mod_finance_storage.tsquery_or(text) OWNER TO folio_admin; -- -- Name: tsquery_phrase(text); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.tsquery_phrase(text) RETURNS tsquery LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE AS $_$ SELECT replace(diku_mod_finance_storage.tsquery_and($1)::text, '&', '<->')::tsquery; $_$; ALTER FUNCTION diku_mod_finance_storage.tsquery_phrase(text) OWNER TO folio_admin; -- -- Name: update_budget_expense_class_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_budget_expense_class_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.budgetId = (NEW.jsonb->>'budgetId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_budget_expense_class_references() OWNER TO folio_admin; -- -- Name: update_budget_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_budget_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fundId = (NEW.jsonb->>'fundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_budget_references() OWNER TO folio_admin; -- -- Name: update_fund_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_fund_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerId = (NEW.jsonb->>'ledgerId'); NEW.fundTypeId = (NEW.jsonb->>'fundTypeId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_fund_references() OWNER TO folio_admin; -- -- Name: update_group_fund_fiscal_year_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.budgetId = (NEW.jsonb->>'budgetId'); NEW.groupId = (NEW.jsonb->>'groupId'); NEW.fundId = (NEW.jsonb->>'fundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references() OWNER TO folio_admin; -- -- Name: update_ledger_fiscal_year_rollover_error_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerRolloverId = (NEW.jsonb->>'ledgerRolloverId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references() OWNER TO folio_admin; -- -- Name: update_ledger_fiscal_year_rollover_progress_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerRolloverId = (NEW.jsonb->>'ledgerRolloverId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references() OWNER TO folio_admin; -- -- Name: update_ledger_fiscal_year_rollover_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.ledgerId = (NEW.jsonb->>'ledgerId'); NEW.fromFiscalYearId = (NEW.jsonb->>'fromFiscalYearId'); NEW.toFiscalYearId = (NEW.jsonb->>'toFiscalYearId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references() OWNER TO folio_admin; -- -- Name: update_ledger_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_ledger_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fiscalYearOneId = (NEW.jsonb->>'fiscalYearOneId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_ledger_references() OWNER TO folio_admin; -- -- Name: update_temporary_invoice_transactions_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.sourceInvoiceId = (NEW.jsonb->>'sourceInvoiceId'); NEW.paymentEncumbranceId = (NEW.jsonb->>'paymentEncumbranceId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.toFundId = (NEW.jsonb->>'toFundId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references() OWNER TO folio_admin; -- -- Name: update_temporary_order_transactions_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.encumbrance_sourcePurchaseOrderId = (NEW.jsonb->'encumbrance'->>'sourcePurchaseOrderId'); NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references() OWNER TO folio_admin; -- -- Name: update_transaction_references(); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.update_transaction_references() RETURNS trigger LANGUAGE plpgsql AS $$ BEGIN NEW.fiscalYearId = (NEW.jsonb->>'fiscalYearId'); NEW.fromFundId = (NEW.jsonb->>'fromFundId'); NEW.sourceFiscalYearId = (NEW.jsonb->>'sourceFiscalYearId'); NEW.toFundId = (NEW.jsonb->>'toFundId'); NEW.expenseClassId = (NEW.jsonb->>'expenseClassId'); RETURN NEW; END; $$; ALTER FUNCTION diku_mod_finance_storage.update_transaction_references() OWNER TO folio_admin; -- -- Name: upsert(text, uuid, anyelement); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.upsert(text, uuid, anyelement) RETURNS uuid LANGUAGE plpgsql AS $_$ DECLARE ret uuid; BEGIN EXECUTE format('UPDATE diku_mod_finance_storage.%I SET jsonb=$3 WHERE id=$2 RETURNING id', $1) USING $1, $2, $3 INTO ret; IF ret IS NOT NULL THEN RETURN ret; END IF; EXECUTE format('INSERT INTO diku_mod_finance_storage.%I (id, jsonb) VALUES ($2, $3) RETURNING id', $1) USING $1, $2, $3 INTO STRICT ret; RETURN ret; END; $_$; ALTER FUNCTION diku_mod_finance_storage.upsert(text, uuid, anyelement) OWNER TO folio_admin; -- -- Name: uuid_larger(uuid, uuid); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.uuid_larger(uuid, uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 > $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $_$; ALTER FUNCTION diku_mod_finance_storage.uuid_larger(uuid, uuid) OWNER TO folio_admin; -- -- Name: uuid_smaller(uuid, uuid); Type: FUNCTION; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE FUNCTION diku_mod_finance_storage.uuid_smaller(uuid, uuid) RETURNS uuid LANGUAGE plpgsql AS $_$ BEGIN IF $1 IS NULL THEN RETURN $2; END IF; IF $2 IS NULL THEN RETURN $1; END IF; IF $1 < $2 THEN RETURN $1; ELSE RETURN $2; END IF; END; $_$; ALTER FUNCTION diku_mod_finance_storage.uuid_smaller(uuid, uuid) OWNER TO folio_admin; -- -- Name: max(uuid); Type: AGGREGATE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE AGGREGATE diku_mod_finance_storage.max(uuid) ( SFUNC = diku_mod_finance_storage.uuid_larger, STYPE = uuid, COMBINEFUNC = diku_mod_finance_storage.uuid_larger, SORTOP = OPERATOR(pg_catalog.>), PARALLEL = safe ); ALTER AGGREGATE diku_mod_finance_storage.max(uuid) OWNER TO folio_admin; -- -- Name: min(uuid); Type: AGGREGATE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE AGGREGATE diku_mod_finance_storage.min(uuid) ( SFUNC = diku_mod_finance_storage.uuid_smaller, STYPE = uuid, COMBINEFUNC = diku_mod_finance_storage.uuid_smaller, SORTOP = OPERATOR(pg_catalog.<), PARALLEL = safe ); ALTER AGGREGATE diku_mod_finance_storage.min(uuid) OWNER TO folio_admin; SET default_tablespace = ''; SET default_table_access_method = heap; -- -- Name: budget; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.budget ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fundid uuid, fiscalyearid uuid ); ALTER TABLE diku_mod_finance_storage.budget OWNER TO folio_admin; -- -- Name: budget_expense_class; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.budget_expense_class ( id uuid NOT NULL, jsonb jsonb NOT NULL, budgetid uuid, expenseclassid uuid ); ALTER TABLE diku_mod_finance_storage.budget_expense_class OWNER TO folio_admin; -- -- Name: budget_financial_summary_view; Type: VIEW; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE VIEW diku_mod_finance_storage.budget_financial_summary_view AS SELECT calc.id, (((((((calc.jsonb || jsonb_build_object('allocated', calc.allocated)) || jsonb_build_object('totalFunding', calc.totalfunding)) || jsonb_build_object('cashBalance', calc.cashbalance)) || jsonb_build_object('overEncumbrance', calc.overencumbrance)) || jsonb_build_object('overExpended', calc.overexpended)) || jsonb_build_object('available', calc.available)) || jsonb_build_object('unavailable', calc.unavailable)) AS jsonb, calc.fundid, calc.fiscalyearid, calc.creation_date FROM ( SELECT budget.id, budget.jsonb, budget.fundid, budget.fiscalyearid, al.allocated, tf.totalfunding, cb.cashbalance, oex.overexpended, oen.overencumbrance, av.available, un.unavailable, budget.creation_date FROM diku_mod_finance_storage.budget, LATERAL ( SELECT ((budget.jsonb ->> 'initialAllocation'::text))::numeric AS initialallocation) ia, LATERAL ( SELECT ((budget.jsonb ->> 'allocationTo'::text))::numeric AS allocationto) at, LATERAL ( SELECT ((budget.jsonb ->> 'allocationFrom'::text))::numeric AS allocationfrom) af, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'expenditures'::text))::numeric, (0)::numeric) AS expenditures) ex, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'awaitingPayment'::text))::numeric, (0)::numeric) AS awaitingpayment) ap, LATERAL ( SELECT ((budget.jsonb ->> 'encumbered'::text))::numeric AS encumbered) en, LATERAL ( SELECT COALESCE(((budget.jsonb ->> 'netTransfers'::text))::numeric, (0)::numeric) AS nettransfers) nt, LATERAL ( SELECT ((ia.initialallocation + at.allocationto) - af.allocationfrom) AS allocated) al, LATERAL ( SELECT (al.allocated + nt.nettransfers) AS totalfunding) tf, LATERAL ( SELECT (tf.totalfunding - ex.expenditures) AS cashbalance) cb, LATERAL ( SELECT GREATEST((en.encumbered - GREATEST((GREATEST((tf.totalfunding - ex.expenditures), (0)::numeric) - ap.awaitingpayment), (0)::numeric)), (0)::numeric) AS overencumbrance) oen, LATERAL ( SELECT GREATEST(((ap.awaitingpayment + ex.expenditures) - tf.totalfunding), (0)::numeric) AS overexpended) oex, LATERAL ( SELECT ((en.encumbered + ap.awaitingpayment) + ex.expenditures) AS unavailable) un, LATERAL ( SELECT GREATEST((tf.totalfunding - un.unavailable), (0)::numeric) AS available) av) calc; ALTER TABLE diku_mod_finance_storage.budget_financial_summary_view OWNER TO folio_admin; -- -- Name: expense_class; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.expense_class ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.expense_class OWNER TO folio_admin; -- -- Name: fiscal_year; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.fiscal_year ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text ); ALTER TABLE diku_mod_finance_storage.fiscal_year OWNER TO folio_admin; -- -- Name: fund; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.fund ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerid uuid, fundtypeid uuid ); ALTER TABLE diku_mod_finance_storage.fund OWNER TO folio_admin; -- -- Name: fund_type; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.fund_type ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.fund_type OWNER TO folio_admin; -- -- Name: group_fund_fiscal_year; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.group_fund_fiscal_year ( id uuid NOT NULL, jsonb jsonb NOT NULL, budgetid uuid, groupid uuid, fundid uuid, fiscalyearid uuid ); ALTER TABLE diku_mod_finance_storage.group_fund_fiscal_year OWNER TO folio_admin; -- -- Name: groups; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.groups ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text ); ALTER TABLE diku_mod_finance_storage.groups OWNER TO folio_admin; -- -- Name: group_budgets_view; Type: VIEW; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE VIEW diku_mod_finance_storage.group_budgets_view AS SELECT budget.id, budget.jsonb, groups.jsonb AS group_jsonb FROM ((diku_mod_finance_storage.budget LEFT JOIN diku_mod_finance_storage.group_fund_fiscal_year ON ((budget.id = group_fund_fiscal_year.budgetid))) LEFT JOIN diku_mod_finance_storage.groups ON ((group_fund_fiscal_year.groupid = groups.id))); ALTER TABLE diku_mod_finance_storage.group_budgets_view OWNER TO folio_admin; -- -- Name: invoice_transaction_summaries; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.invoice_transaction_summaries ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.invoice_transaction_summaries OWNER TO folio_admin; -- -- Name: ledger; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.ledger ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fiscalyearoneid uuid ); ALTER TABLE diku_mod_finance_storage.ledger OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerid uuid, fromfiscalyearid uuid, tofiscalyearid uuid ); ALTER TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover_error; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerrolloverid uuid ); ALTER TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error OWNER TO folio_admin; -- -- Name: ledger_fiscal_year_rollover_progress; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, ledgerrolloverid uuid ); ALTER TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress OWNER TO folio_admin; -- -- Name: order_transaction_summaries; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.order_transaction_summaries ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.order_transaction_summaries OWNER TO folio_admin; -- -- Name: rmb_internal; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.rmb_internal ( id integer NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.rmb_internal OWNER TO folio_admin; -- -- Name: rmb_internal_analyze; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.rmb_internal_analyze ( tablename text ); ALTER TABLE diku_mod_finance_storage.rmb_internal_analyze OWNER TO folio_admin; -- -- Name: rmb_internal_id_seq; Type: SEQUENCE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE SEQUENCE diku_mod_finance_storage.rmb_internal_id_seq AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE diku_mod_finance_storage.rmb_internal_id_seq OWNER TO folio_admin; -- -- Name: rmb_internal_id_seq; Type: SEQUENCE OWNED BY; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER SEQUENCE diku_mod_finance_storage.rmb_internal_id_seq OWNED BY diku_mod_finance_storage.rmb_internal.id; -- -- Name: rmb_internal_index; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.rmb_internal_index ( name text NOT NULL, def text NOT NULL, remove boolean NOT NULL ); ALTER TABLE diku_mod_finance_storage.rmb_internal_index OWNER TO folio_admin; -- -- Name: rmb_job; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.rmb_job ( id uuid NOT NULL, jsonb jsonb NOT NULL ); ALTER TABLE diku_mod_finance_storage.rmb_job OWNER TO folio_admin; -- -- Name: temporary_invoice_transactions; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.temporary_invoice_transactions ( id uuid NOT NULL, jsonb jsonb NOT NULL, sourceinvoiceid uuid, paymentencumbranceid uuid, fromfundid uuid, tofundid uuid, fiscalyearid uuid, expenseclassid uuid ); ALTER TABLE diku_mod_finance_storage.temporary_invoice_transactions OWNER TO folio_admin; -- -- Name: temporary_order_transactions; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.temporary_order_transactions ( id uuid NOT NULL, jsonb jsonb NOT NULL, encumbrance_sourcepurchaseorderid uuid, fiscalyearid uuid, fromfundid uuid, expenseclassid uuid ); ALTER TABLE diku_mod_finance_storage.temporary_order_transactions OWNER TO folio_admin; -- -- Name: transaction; Type: TABLE; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TABLE diku_mod_finance_storage.transaction ( id uuid NOT NULL, jsonb jsonb NOT NULL, creation_date timestamp without time zone, created_by text, fiscalyearid uuid, fromfundid uuid, sourcefiscalyearid uuid, tofundid uuid, expenseclassid uuid ); ALTER TABLE diku_mod_finance_storage.transaction OWNER TO folio_admin; -- -- Name: rmb_internal id; Type: DEFAULT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.rmb_internal ALTER COLUMN id SET DEFAULT nextval('diku_mod_finance_storage.rmb_internal_id_seq'::regclass); -- -- Data for Name: budget; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.budget (id, jsonb, creation_date, created_by, fundid, fiscalyearid) FROM stdin; \. COPY diku_mod_finance_storage.budget (id, jsonb, creation_date, created_by, fundid, fiscalyearid) FROM '$$PATH$$/10653.dat'; -- -- Data for Name: budget_expense_class; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.budget_expense_class (id, jsonb, budgetid, expenseclassid) FROM stdin; \. COPY diku_mod_finance_storage.budget_expense_class (id, jsonb, budgetid, expenseclassid) FROM '$$PATH$$/10654.dat'; -- -- Data for Name: expense_class; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.expense_class (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.expense_class (id, jsonb) FROM '$$PATH$$/10648.dat'; -- -- Data for Name: fiscal_year; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.fiscal_year (id, jsonb, creation_date, created_by) FROM stdin; \. COPY diku_mod_finance_storage.fiscal_year (id, jsonb, creation_date, created_by) FROM '$$PATH$$/10649.dat'; -- -- Data for Name: fund; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.fund (id, jsonb, creation_date, created_by, ledgerid, fundtypeid) FROM stdin; \. COPY diku_mod_finance_storage.fund (id, jsonb, creation_date, created_by, ledgerid, fundtypeid) FROM '$$PATH$$/10652.dat'; -- -- Data for Name: fund_type; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.fund_type (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.fund_type (id, jsonb) FROM '$$PATH$$/10651.dat'; -- -- Data for Name: group_fund_fiscal_year; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.group_fund_fiscal_year (id, jsonb, budgetid, groupid, fundid, fiscalyearid) FROM stdin; \. COPY diku_mod_finance_storage.group_fund_fiscal_year (id, jsonb, budgetid, groupid, fundid, fiscalyearid) FROM '$$PATH$$/10657.dat'; -- -- Data for Name: groups; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.groups (id, jsonb, creation_date, created_by) FROM stdin; \. COPY diku_mod_finance_storage.groups (id, jsonb, creation_date, created_by) FROM '$$PATH$$/10656.dat'; -- -- Data for Name: invoice_transaction_summaries; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.invoice_transaction_summaries (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.invoice_transaction_summaries (id, jsonb) FROM '$$PATH$$/10660.dat'; -- -- Data for Name: ledger; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.ledger (id, jsonb, creation_date, created_by, fiscalyearoneid) FROM stdin; \. COPY diku_mod_finance_storage.ledger (id, jsonb, creation_date, created_by, fiscalyearoneid) FROM '$$PATH$$/10650.dat'; -- -- Data for Name: ledger_fiscal_year_rollover; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.ledger_fiscal_year_rollover (id, jsonb, creation_date, created_by, ledgerid, fromfiscalyearid, tofiscalyearid) FROM stdin; \. COPY diku_mod_finance_storage.ledger_fiscal_year_rollover (id, jsonb, creation_date, created_by, ledgerid, fromfiscalyearid, tofiscalyearid) FROM '$$PATH$$/10662.dat'; -- -- Data for Name: ledger_fiscal_year_rollover_error; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM stdin; \. COPY diku_mod_finance_storage.ledger_fiscal_year_rollover_error (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM '$$PATH$$/10664.dat'; -- -- Data for Name: ledger_fiscal_year_rollover_progress; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM stdin; \. COPY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress (id, jsonb, creation_date, created_by, ledgerrolloverid) FROM '$$PATH$$/10663.dat'; -- -- Data for Name: order_transaction_summaries; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.order_transaction_summaries (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.order_transaction_summaries (id, jsonb) FROM '$$PATH$$/10658.dat'; -- -- Data for Name: rmb_internal; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.rmb_internal (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.rmb_internal (id, jsonb) FROM '$$PATH$$/10644.dat'; -- -- Data for Name: rmb_internal_analyze; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.rmb_internal_analyze (tablename) FROM stdin; \. COPY diku_mod_finance_storage.rmb_internal_analyze (tablename) FROM '$$PATH$$/10647.dat'; -- -- Data for Name: rmb_internal_index; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.rmb_internal_index (name, def, remove) FROM stdin; \. COPY diku_mod_finance_storage.rmb_internal_index (name, def, remove) FROM '$$PATH$$/10646.dat'; -- -- Data for Name: rmb_job; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.rmb_job (id, jsonb) FROM stdin; \. COPY diku_mod_finance_storage.rmb_job (id, jsonb) FROM '$$PATH$$/10645.dat'; -- -- Data for Name: temporary_invoice_transactions; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.temporary_invoice_transactions (id, jsonb, sourceinvoiceid, paymentencumbranceid, fromfundid, tofundid, fiscalyearid, expenseclassid) FROM stdin; \. COPY diku_mod_finance_storage.temporary_invoice_transactions (id, jsonb, sourceinvoiceid, paymentencumbranceid, fromfundid, tofundid, fiscalyearid, expenseclassid) FROM '$$PATH$$/10661.dat'; -- -- Data for Name: temporary_order_transactions; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.temporary_order_transactions (id, jsonb, encumbrance_sourcepurchaseorderid, fiscalyearid, fromfundid, expenseclassid) FROM stdin; \. COPY diku_mod_finance_storage.temporary_order_transactions (id, jsonb, encumbrance_sourcepurchaseorderid, fiscalyearid, fromfundid, expenseclassid) FROM '$$PATH$$/10659.dat'; -- -- Data for Name: transaction; Type: TABLE DATA; Schema: diku_mod_finance_storage; Owner: folio_admin -- COPY diku_mod_finance_storage.transaction (id, jsonb, creation_date, created_by, fiscalyearid, fromfundid, sourcefiscalyearid, tofundid, expenseclassid) FROM stdin; \. COPY diku_mod_finance_storage.transaction (id, jsonb, creation_date, created_by, fiscalyearid, fromfundid, sourcefiscalyearid, tofundid, expenseclassid) FROM '$$PATH$$/10655.dat'; -- -- Name: rmb_internal_id_seq; Type: SEQUENCE SET; Schema: diku_mod_finance_storage; Owner: folio_admin -- SELECT pg_catalog.setval('diku_mod_finance_storage.rmb_internal_id_seq', 1, true); -- -- Name: budget_expense_class budget_expense_class_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT budget_expense_class_pkey PRIMARY KEY (id); -- -- Name: budget budget_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT budget_pkey PRIMARY KEY (id); -- -- Name: expense_class expense_class_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.expense_class ADD CONSTRAINT expense_class_pkey PRIMARY KEY (id); -- -- Name: fiscal_year fiscal_year_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.fiscal_year ADD CONSTRAINT fiscal_year_pkey PRIMARY KEY (id); -- -- Name: fund fund_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT fund_pkey PRIMARY KEY (id); -- -- Name: fund_type fund_type_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.fund_type ADD CONSTRAINT fund_type_pkey PRIMARY KEY (id); -- -- Name: group_fund_fiscal_year group_fund_fiscal_year_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT group_fund_fiscal_year_pkey PRIMARY KEY (id); -- -- Name: groups groups_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.groups ADD CONSTRAINT groups_pkey PRIMARY KEY (id); -- -- Name: invoice_transaction_summaries invoice_transaction_summaries_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.invoice_transaction_summaries ADD CONSTRAINT invoice_transaction_summaries_pkey PRIMARY KEY (id); -- -- Name: ledger_fiscal_year_rollover_error ledger_fiscal_year_rollover_error_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error ADD CONSTRAINT ledger_fiscal_year_rollover_error_pkey PRIMARY KEY (id); -- -- Name: ledger_fiscal_year_rollover ledger_fiscal_year_rollover_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT ledger_fiscal_year_rollover_pkey PRIMARY KEY (id); -- -- Name: ledger_fiscal_year_rollover_progress ledger_fiscal_year_rollover_progress_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ADD CONSTRAINT ledger_fiscal_year_rollover_progress_pkey PRIMARY KEY (id); -- -- Name: ledger ledger_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger ADD CONSTRAINT ledger_pkey PRIMARY KEY (id); -- -- Name: order_transaction_summaries order_transaction_summaries_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.order_transaction_summaries ADD CONSTRAINT order_transaction_summaries_pkey PRIMARY KEY (id); -- -- Name: rmb_internal_index rmb_internal_index_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.rmb_internal_index ADD CONSTRAINT rmb_internal_index_pkey PRIMARY KEY (name); -- -- Name: rmb_internal rmb_internal_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.rmb_internal ADD CONSTRAINT rmb_internal_pkey PRIMARY KEY (id); -- -- Name: rmb_job rmb_job_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.rmb_job ADD CONSTRAINT rmb_job_pkey PRIMARY KEY (id); -- -- Name: temporary_invoice_transactions temporary_invoice_transactions_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT temporary_invoice_transactions_pkey PRIMARY KEY (id); -- -- Name: temporary_order_transactions temporary_order_transactions_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT temporary_order_transactions_pkey PRIMARY KEY (id); -- -- Name: transaction transaction_pkey; Type: CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT transaction_pkey PRIMARY KEY (id); -- -- Name: budget_budgetstatus_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX budget_budgetstatus_idx_gin ON diku_mod_finance_storage.budget USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'budgetStatus'::text))) public.gin_trgm_ops); -- -- Name: budget_expense_class_budgetid_expenseclassid_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX budget_expense_class_budgetid_expenseclassid_idx_unique ON diku_mod_finance_storage.budget_expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'budgetId'::text), (jsonb ->> 'expenseClassId'::text)])))); -- -- Name: budget_expense_class_budgetid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX budget_expense_class_budgetid_idx ON diku_mod_finance_storage.budget_expense_class USING btree (budgetid); -- -- Name: budget_expense_class_expenseclassid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX budget_expense_class_expenseclassid_idx ON diku_mod_finance_storage.budget_expense_class USING btree (expenseclassid); -- -- Name: budget_fiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX budget_fiscalyearid_idx ON diku_mod_finance_storage.budget USING btree (fiscalyearid); -- -- Name: budget_fundid_fiscalyearid_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX budget_fundid_fiscalyearid_idx_unique ON diku_mod_finance_storage.budget USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fiscalYearId'::text)))); -- -- Name: budget_fundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX budget_fundid_idx ON diku_mod_finance_storage.budget USING btree (fundid); -- -- Name: budget_name_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX budget_name_idx_unique ON diku_mod_finance_storage.budget USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); -- -- Name: expense_class_code_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX expense_class_code_idx_unique ON diku_mod_finance_storage.expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); -- -- Name: expense_class_name_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX expense_class_name_idx_unique ON diku_mod_finance_storage.expense_class USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); -- -- Name: fiscal_year_acqunitids_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fiscal_year_acqunitids_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); -- -- Name: fiscal_year_code_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX fiscal_year_code_idx_unique ON diku_mod_finance_storage.fiscal_year USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); -- -- Name: fiscal_year_name_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fiscal_year_name_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); -- -- Name: fiscal_year_periodend_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fiscal_year_periodend_idx ON diku_mod_finance_storage.fiscal_year USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'periodEnd'::text))), 600)); -- -- Name: fiscal_year_series_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fiscal_year_series_idx_gin ON diku_mod_finance_storage.fiscal_year USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'series'::text))) public.gin_trgm_ops); -- -- Name: fund_acqunitids_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fund_acqunitids_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); -- -- Name: fund_code_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX fund_code_idx_unique ON diku_mod_finance_storage.fund USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); -- -- Name: fund_fundstatus_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fund_fundstatus_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundStatus'::text))) public.gin_trgm_ops); -- -- Name: fund_fundtypeid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fund_fundtypeid_idx ON diku_mod_finance_storage.fund USING btree (fundtypeid); -- -- Name: fund_ledgerid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fund_ledgerid_idx ON diku_mod_finance_storage.fund USING btree (ledgerid); -- -- Name: fund_name_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX fund_name_idx_gin ON diku_mod_finance_storage.fund USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); -- -- Name: fund_type_name_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX fund_type_name_idx_unique ON diku_mod_finance_storage.fund_type USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); -- -- Name: group_fund_fiscal_year_budgetid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX group_fund_fiscal_year_budgetid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (budgetid); -- -- Name: group_fund_fiscal_year_fiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX group_fund_fiscal_year_fiscalyearid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (fiscalyearid); -- -- Name: group_fund_fiscal_year_fundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX group_fund_fiscal_year_fundid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (fundid); -- -- Name: group_fund_fiscal_year_groupid_fundid_fiscalyearid_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX group_fund_fiscal_year_groupid_fundid_fiscalyearid_idx_unique ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'groupId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fiscalYearId'::text)))); -- -- Name: group_fund_fiscal_year_groupid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX group_fund_fiscal_year_groupid_idx ON diku_mod_finance_storage.group_fund_fiscal_year USING btree (groupid); -- -- Name: groups_acqunitids_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX groups_acqunitids_idx_gin ON diku_mod_finance_storage.groups USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); -- -- Name: groups_code_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX groups_code_idx_unique ON diku_mod_finance_storage.groups USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); -- -- Name: groups_name_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX groups_name_idx_unique ON diku_mod_finance_storage.groups USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); -- -- Name: groups_status_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX groups_status_idx_gin ON diku_mod_finance_storage.groups USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'status'::text))) public.gin_trgm_ops); -- -- Name: ledger_acqunitids_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_acqunitids_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'acqUnitIds'::text))) public.gin_trgm_ops); -- -- Name: ledger_code_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_code_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text))) public.gin_trgm_ops); -- -- Name: ledger_code_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX ledger_code_idx_unique ON diku_mod_finance_storage.ledger USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'code'::text)))); -- -- Name: ledger_fiscal_year_rollover_error_details_fundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_error_details_fundid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent(((jsonb -> 'details'::text) ->> 'fundId'::text))), 600)); -- -- Name: ledger_fiscal_year_rollover_error_details_purchaseorderid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_error_details_purchaseorderid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent(((jsonb -> 'details'::text) ->> 'purchaseOrderId'::text))), 600)); -- -- Name: ledger_fiscal_year_rollover_error_errortype_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_error_errortype_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'errorType'::text))), 600)); -- -- Name: ledger_fiscal_year_rollover_error_ledgerrolloverid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_error_ledgerrolloverid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error USING btree (ledgerrolloverid); -- -- Name: ledger_fiscal_year_rollover_fromfiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_fromfiscalyearid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (fromfiscalyearid); -- -- Name: ledger_fiscal_year_rollover_ledgerid_fromfiscalyearid_idx_uniqu; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX ledger_fiscal_year_rollover_ledgerid_fromfiscalyearid_idx_uniqu ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'ledgerId'::text), (jsonb ->> 'fromFiscalYearId'::text)])))); -- -- Name: ledger_fiscal_year_rollover_ledgerid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_ledgerid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (ledgerid); -- -- Name: ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree (ledgerrolloverid); -- -- Name: ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx_uniqu; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX ledger_fiscal_year_rollover_progress_ledgerrolloverid_idx_uniqu ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'ledgerRolloverId'::text)))); -- -- Name: ledger_fiscal_year_rollover_progress_overallrolloverstatus_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_progress_overallrolloverstatus_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'overallRolloverStatus'::text))), 600)); -- -- Name: ledger_fiscal_year_rollover_tofiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscal_year_rollover_tofiscalyearid_idx ON diku_mod_finance_storage.ledger_fiscal_year_rollover USING btree (tofiscalyearid); -- -- Name: ledger_fiscalyearoneid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_fiscalyearoneid_idx ON diku_mod_finance_storage.ledger USING btree (fiscalyearoneid); -- -- Name: ledger_ledgerstatus_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_ledgerstatus_idx ON diku_mod_finance_storage.ledger USING btree ("left"(lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'ledgerStatus'::text))), 600)); -- -- Name: ledger_name_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX ledger_name_idx_gin ON diku_mod_finance_storage.ledger USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text))) public.gin_trgm_ops); -- -- Name: ledger_name_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX ledger_name_idx_unique ON diku_mod_finance_storage.ledger USING btree (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'name'::text)))); -- -- Name: temporary_invoice_transactions_expenseclassid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_expenseclassid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (expenseclassid); -- -- Name: temporary_invoice_transactions_fiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_fiscalyearid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (fiscalyearid); -- -- Name: temporary_invoice_transactions_fromfundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_fromfundid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (fromfundid); -- -- Name: temporary_invoice_transactions_paymentencumbranceid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_paymentencumbranceid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (paymentencumbranceid); -- -- Name: temporary_invoice_transactions_sourceinvoiceid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_sourceinvoiceid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (sourceinvoiceid); -- -- Name: temporary_invoice_transactions_temp_invoice_tx_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX temporary_invoice_transactions_temp_invoice_tx_idx_unique ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'amount'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'fromFundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'sourceInvoiceId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'sourceInvoiceLineId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'toFundId'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'transactionType'::text))), lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'expenseClassId'::text)))])); -- -- Name: temporary_invoice_transactions_tofundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_invoice_transactions_tofundid_idx ON diku_mod_finance_storage.temporary_invoice_transactions USING btree (tofundid); -- -- Name: temporary_order_transactions_encumbrance_sourcepurchaseorderid_; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_order_transactions_encumbrance_sourcepurchaseorderid_ ON diku_mod_finance_storage.temporary_order_transactions USING btree (encumbrance_sourcepurchaseorderid); -- -- Name: temporary_order_transactions_expenseclassid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_order_transactions_expenseclassid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (expenseclassid); -- -- Name: temporary_order_transactions_fiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_order_transactions_fiscalyearid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (fiscalyearid); -- -- Name: temporary_order_transactions_fromfundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX temporary_order_transactions_fromfundid_idx ON diku_mod_finance_storage.temporary_order_transactions USING btree (fromfundid); -- -- Name: temporary_order_transactions_temp_order_tx_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX temporary_order_transactions_temp_order_tx_idx_unique ON diku_mod_finance_storage.temporary_order_transactions USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePurchaseOrderId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePoLineId'::text), ((jsonb -> 'encumbrance'::text) ->> 'initialAmountEncumbered'::text), ((jsonb -> 'encumbrance'::text) ->> 'status'::text), (jsonb ->> 'expenseClassId'::text)])))); -- -- Name: transaction_amount_idx_gin; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_amount_idx_gin ON diku_mod_finance_storage.transaction USING gin (lower(diku_mod_finance_storage.f_unaccent((jsonb ->> 'amount'::text))) public.gin_trgm_ops); -- -- Name: transaction_credit_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX transaction_credit_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'toFundId'::text), (jsonb ->> 'sourceInvoiceId'::text), (jsonb ->> 'sourceInvoiceLineId'::text), (jsonb ->> 'transactionType'::text), (jsonb ->> 'expenseClassId'::text)])))) WHERE ((jsonb ->> 'transactionType'::text) = 'Credit'::text); -- -- Name: transaction_encumbrance_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX transaction_encumbrance_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePurchaseOrderId'::text), ((jsonb -> 'encumbrance'::text) ->> 'sourcePoLineId'::text), ((jsonb -> 'encumbrance'::text) ->> 'initialAmountEncumbered'::text), ((jsonb -> 'encumbrance'::text) ->> 'status'::text), (jsonb ->> 'expenseClassId'::text), (jsonb ->> 'fiscalYearId'::text)])))) WHERE ((jsonb ->> 'transactionType'::text) = 'Encumbrance'::text); -- -- Name: transaction_expenseclassid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_expenseclassid_idx ON diku_mod_finance_storage.transaction USING btree (expenseclassid); -- -- Name: transaction_fiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_fiscalyearid_idx ON diku_mod_finance_storage.transaction USING btree (fiscalyearid); -- -- Name: transaction_fromfundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_fromfundid_idx ON diku_mod_finance_storage.transaction USING btree (fromfundid); -- -- Name: transaction_payment_idx_unique; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE UNIQUE INDEX transaction_payment_idx_unique ON diku_mod_finance_storage.transaction USING btree (lower(diku_mod_finance_storage.f_unaccent(diku_mod_finance_storage.concat_space_sql(VARIADIC ARRAY[(jsonb ->> 'amount'::text), (jsonb ->> 'fromFundId'::text), (jsonb ->> 'sourceInvoiceId'::text), (jsonb ->> 'sourceInvoiceLineId'::text), (jsonb ->> 'transactionType'::text), (jsonb ->> 'expenseClassId'::text)])))) WHERE (((jsonb ->> 'transactionType'::text) = 'Payment'::text) OR ((jsonb ->> 'transactionType'::text) = 'Pending payment'::text)); -- -- Name: transaction_sourcefiscalyearid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_sourcefiscalyearid_idx ON diku_mod_finance_storage.transaction USING btree (sourcefiscalyearid); -- -- Name: transaction_tofundid_idx; Type: INDEX; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE INDEX transaction_tofundid_idx ON diku_mod_finance_storage.transaction USING btree (tofundid); -- -- Name: budget set_budget_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_budget_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_budget_md_json(); -- -- Name: budget set_budget_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_budget_md_trigger BEFORE INSERT ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.budget_set_md(); -- -- Name: fiscal_year set_fiscal_year_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_fiscal_year_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_fiscal_year_md_json(); -- -- Name: fiscal_year set_fiscal_year_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_fiscal_year_md_trigger BEFORE INSERT ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.fiscal_year_set_md(); -- -- Name: fund set_fund_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_fund_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_fund_md_json(); -- -- Name: fund set_fund_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_fund_md_trigger BEFORE INSERT ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.fund_set_md(); -- -- Name: groups set_groups_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_groups_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_groups_md_json(); -- -- Name: groups set_groups_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_groups_md_trigger BEFORE INSERT ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.groups_set_md(); -- -- Name: budget set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: budget_expense_class set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget_expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: expense_class set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: fiscal_year set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: fund set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: fund_type set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund_type FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: group_fund_fiscal_year set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.group_fund_fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: groups set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.groups FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: invoice_transaction_summaries set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.invoice_transaction_summaries FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: ledger set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: ledger_fiscal_year_rollover set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: ledger_fiscal_year_rollover_error set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: ledger_fiscal_year_rollover_progress set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: order_transaction_summaries set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.order_transaction_summaries FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: temporary_invoice_transactions set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_invoice_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: temporary_order_transactions set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_order_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: transaction set_id_in_jsonb; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_id_in_jsonb BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_id_in_jsonb(); -- -- Name: ledger_fiscal_year_rollover_error set_ledger_fiscal_year_rollover_error_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_error_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_error_md_json(); -- -- Name: ledger_fiscal_year_rollover_error set_ledger_fiscal_year_rollover_error_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_error_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_error_set_md(); -- -- Name: ledger_fiscal_year_rollover set_ledger_fiscal_year_rollover_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_md_json(); -- -- Name: ledger_fiscal_year_rollover set_ledger_fiscal_year_rollover_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_set_md(); -- -- Name: ledger_fiscal_year_rollover_progress set_ledger_fiscal_year_rollover_progress_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_progress_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_fiscal_year_rollover_progress_md_json(); -- -- Name: ledger_fiscal_year_rollover_progress set_ledger_fiscal_year_rollover_progress_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_fiscal_year_rollover_progress_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_fiscal_year_rollover_progress_set_md(); -- -- Name: ledger set_ledger_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_ledger_md_json(); -- -- Name: ledger set_ledger_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_ledger_md_trigger BEFORE INSERT ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.ledger_set_md(); -- -- Name: transaction set_transaction_md_json_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_transaction_md_json_trigger BEFORE UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.set_transaction_md_json(); -- -- Name: transaction set_transaction_md_trigger; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER set_transaction_md_trigger BEFORE INSERT ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.transaction_set_md(); -- -- Name: budget_expense_class update_budget_expense_class_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_budget_expense_class_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget_expense_class FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_budget_expense_class_references(); -- -- Name: budget update_budget_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_budget_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.budget FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_budget_references(); -- -- Name: fund update_fund_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_fund_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.fund FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_fund_references(); -- -- Name: group_fund_fiscal_year update_group_fund_fiscal_year_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_group_fund_fiscal_year_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.group_fund_fiscal_year FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_group_fund_fiscal_year_references(); -- -- Name: ledger_fiscal_year_rollover_error update_ledger_fiscal_year_rollover_error_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_ledger_fiscal_year_rollover_error_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_error FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_error_references(); -- -- Name: ledger_fiscal_year_rollover_progress update_ledger_fiscal_year_rollover_progress_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_ledger_fiscal_year_rollover_progress_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover_progress FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_progress_references(); -- -- Name: ledger_fiscal_year_rollover update_ledger_fiscal_year_rollover_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_ledger_fiscal_year_rollover_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger_fiscal_year_rollover FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_fiscal_year_rollover_references(); -- -- Name: ledger update_ledger_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_ledger_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.ledger FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_ledger_references(); -- -- Name: temporary_invoice_transactions update_temporary_invoice_transactions_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_temporary_invoice_transactions_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_invoice_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_temporary_invoice_transactions_references(); -- -- Name: temporary_order_transactions update_temporary_order_transactions_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_temporary_order_transactions_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.temporary_order_transactions FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_temporary_order_transactions_references(); -- -- Name: transaction update_transaction_references; Type: TRIGGER; Schema: diku_mod_finance_storage; Owner: folio_admin -- CREATE TRIGGER update_transaction_references BEFORE INSERT OR UPDATE ON diku_mod_finance_storage.transaction FOR EACH ROW EXECUTE FUNCTION diku_mod_finance_storage.update_transaction_references(); -- -- Name: budget_expense_class budgetid_budget_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT budgetid_budget_fkey FOREIGN KEY (budgetid) REFERENCES diku_mod_finance_storage.budget(id); -- -- Name: group_fund_fiscal_year budgetid_budget_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT budgetid_budget_fkey FOREIGN KEY (budgetid) REFERENCES diku_mod_finance_storage.budget(id); -- -- Name: temporary_order_transactions encumbrance_sourcepurchaseorderid_order_transaction_summaries_f; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT encumbrance_sourcepurchaseorderid_order_transaction_summaries_f FOREIGN KEY (encumbrance_sourcepurchaseorderid) REFERENCES diku_mod_finance_storage.order_transaction_summaries(id); -- -- Name: budget_expense_class expenseclassid_expense_class_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget_expense_class ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); -- -- Name: transaction expenseclassid_expense_class_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); -- -- Name: temporary_order_transactions expenseclassid_expense_class_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); -- -- Name: temporary_invoice_transactions expenseclassid_expense_class_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT expenseclassid_expense_class_fkey FOREIGN KEY (expenseclassid) REFERENCES diku_mod_finance_storage.expense_class(id); -- -- Name: budget fiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: transaction fiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: group_fund_fiscal_year fiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: temporary_order_transactions fiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: temporary_invoice_transactions fiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT fiscalyearid_fiscal_year_fkey FOREIGN KEY (fiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: ledger fiscalyearoneid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger ADD CONSTRAINT fiscalyearoneid_fiscal_year_fkey FOREIGN KEY (fiscalyearoneid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: ledger_fiscal_year_rollover fromfiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT fromfiscalyearid_fiscal_year_fkey FOREIGN KEY (fromfiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: transaction fromfundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: temporary_order_transactions fromfundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_order_transactions ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: temporary_invoice_transactions fromfundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT fromfundid_fund_fkey FOREIGN KEY (fromfundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: budget fundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.budget ADD CONSTRAINT fundid_fund_fkey FOREIGN KEY (fundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: group_fund_fiscal_year fundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT fundid_fund_fkey FOREIGN KEY (fundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: fund fundtypeid_fund_type_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT fundtypeid_fund_type_fkey FOREIGN KEY (fundtypeid) REFERENCES diku_mod_finance_storage.fund_type(id); -- -- Name: group_fund_fiscal_year groupid_groups_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.group_fund_fiscal_year ADD CONSTRAINT groupid_groups_fkey FOREIGN KEY (groupid) REFERENCES diku_mod_finance_storage.groups(id); -- -- Name: fund ledgerid_ledger_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.fund ADD CONSTRAINT ledgerid_ledger_fkey FOREIGN KEY (ledgerid) REFERENCES diku_mod_finance_storage.ledger(id); -- -- Name: ledger_fiscal_year_rollover ledgerid_ledger_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT ledgerid_ledger_fkey FOREIGN KEY (ledgerid) REFERENCES diku_mod_finance_storage.ledger(id); -- -- Name: ledger_fiscal_year_rollover_progress ledgerrolloverid_ledger_fiscal_year_rollover_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_progress ADD CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey FOREIGN KEY (ledgerrolloverid) REFERENCES diku_mod_finance_storage.ledger_fiscal_year_rollover(id); -- -- Name: ledger_fiscal_year_rollover_error ledgerrolloverid_ledger_fiscal_year_rollover_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover_error ADD CONSTRAINT ledgerrolloverid_ledger_fiscal_year_rollover_fkey FOREIGN KEY (ledgerrolloverid) REFERENCES diku_mod_finance_storage.ledger_fiscal_year_rollover(id); -- -- Name: temporary_invoice_transactions paymentencumbranceid_transaction_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT paymentencumbranceid_transaction_fkey FOREIGN KEY (paymentencumbranceid) REFERENCES diku_mod_finance_storage.transaction(id); -- -- Name: transaction sourcefiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT sourcefiscalyearid_fiscal_year_fkey FOREIGN KEY (sourcefiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: temporary_invoice_transactions sourceinvoiceid_invoice_transaction_summaries_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT sourceinvoiceid_invoice_transaction_summaries_fkey FOREIGN KEY (sourceinvoiceid) REFERENCES diku_mod_finance_storage.invoice_transaction_summaries(id); -- -- Name: ledger_fiscal_year_rollover tofiscalyearid_fiscal_year_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.ledger_fiscal_year_rollover ADD CONSTRAINT tofiscalyearid_fiscal_year_fkey FOREIGN KEY (tofiscalyearid) REFERENCES diku_mod_finance_storage.fiscal_year(id); -- -- Name: transaction tofundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.transaction ADD CONSTRAINT tofundid_fund_fkey FOREIGN KEY (tofundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: temporary_invoice_transactions tofundid_fund_fkey; Type: FK CONSTRAINT; Schema: diku_mod_finance_storage; Owner: folio_admin -- ALTER TABLE ONLY diku_mod_finance_storage.temporary_invoice_transactions ADD CONSTRAINT tofundid_fund_fkey FOREIGN KEY (tofundid) REFERENCES diku_mod_finance_storage.fund(id); -- -- Name: TABLE budget; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.budget TO diku_mod_finance_storage; -- -- Name: TABLE budget_expense_class; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.budget_expense_class TO diku_mod_finance_storage; -- -- Name: TABLE budget_financial_summary_view; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.budget_financial_summary_view TO diku_mod_finance_storage; -- -- Name: TABLE expense_class; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.expense_class TO diku_mod_finance_storage; -- -- Name: TABLE fiscal_year; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.fiscal_year TO diku_mod_finance_storage; -- -- Name: TABLE fund; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.fund TO diku_mod_finance_storage; -- -- Name: TABLE fund_type; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.fund_type TO diku_mod_finance_storage; -- -- Name: TABLE group_fund_fiscal_year; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.group_fund_fiscal_year TO diku_mod_finance_storage; -- -- Name: TABLE groups; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.groups TO diku_mod_finance_storage; -- -- Name: TABLE group_budgets_view; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.group_budgets_view TO diku_mod_finance_storage; -- -- Name: TABLE invoice_transaction_summaries; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.invoice_transaction_summaries TO diku_mod_finance_storage; -- -- Name: TABLE ledger; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.ledger TO diku_mod_finance_storage; -- -- Name: TABLE ledger_fiscal_year_rollover; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover TO diku_mod_finance_storage; -- -- Name: TABLE ledger_fiscal_year_rollover_error; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_error TO diku_mod_finance_storage; -- -- Name: TABLE ledger_fiscal_year_rollover_progress; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.ledger_fiscal_year_rollover_progress TO diku_mod_finance_storage; -- -- Name: TABLE order_transaction_summaries; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.order_transaction_summaries TO diku_mod_finance_storage; -- -- Name: TABLE rmb_internal; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal TO diku_mod_finance_storage; -- -- Name: TABLE rmb_internal_analyze; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal_analyze TO diku_mod_finance_storage; -- -- Name: TABLE rmb_internal_index; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.rmb_internal_index TO diku_mod_finance_storage; -- -- Name: TABLE rmb_job; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.rmb_job TO diku_mod_finance_storage; -- -- Name: TABLE temporary_invoice_transactions; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.temporary_invoice_transactions TO diku_mod_finance_storage; -- -- Name: TABLE temporary_order_transactions; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.temporary_order_transactions TO diku_mod_finance_storage; -- -- Name: TABLE transaction; Type: ACL; Schema: diku_mod_finance_storage; Owner: folio_admin -- GRANT ALL ON TABLE diku_mod_finance_storage.transaction TO diku_mod_finance_storage; -- -- PostgreSQL database dump complete --