-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #524 from folio-org/MODFQMMGR-544
MODFQMMGR-544: Remove final materialized view
- Loading branch information
Showing
10 changed files
with
24 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
<tableExists tableName = "statistical_code" schemaName="${tenant_id}_mod_inventory_storage"/> | ||
<tableExists tableName = "statistical_code_type" schemaName="${tenant_id}_mod_inventory_storage"/> | ||
</preConditions> | ||
<sqlFile path="sql/create-mat-view-drv-inventory-statistical-code-full.sql" relativeToChangelogFile="true"/> | ||
<sqlFile path="sql/create-view-drv-inventory-statistical-code-full.sql" relativeToChangelogFile="true"/> | ||
</changeSet> | ||
|
||
<changeSet id="MODFQMMGR-107" author="[email protected]"> | ||
|
@@ -44,10 +44,7 @@ | |
<sql>DROP MATERIALIZED VIEW IF EXISTS drv_pol_receipt_status;</sql> | ||
</changeSet> | ||
<changeSet id="MODFQMMGR-210-refresh-statistical-code" author="[email protected]" runOnChange="true"> | ||
<preConditions onFail="CONTINUE"> | ||
<sqlCheck expectedResult="1">SELECT COUNT(*) FROM pg_matviews WHERE schemaname = '${tenant_id}_mod_fqm_manager'AND matviewname = 'drv_inventory_statistical_code_full';</sqlCheck> | ||
</preConditions> | ||
<sql>REFRESH MATERIALIZED VIEW drv_inventory_statistical_code_full;</sql> | ||
<!-- Changeset logic intentionally removed --> | ||
</changeSet> | ||
<changeSet id="MODFQMMGR-210-refresh-languages" author="[email protected]" runOnChange="true"> | ||
<!-- Changeset logic intentionally removed --> | ||
|
11 changes: 5 additions & 6 deletions
11
...w-drv-inventory-statistical-code-full.sql → ...w-drv-inventory-statistical-code-full.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
DROP MATERIALIZED VIEW IF EXISTS drv_inventory_statistical_code_full; | ||
DROP MATERIALIZED VIEW IF EXISTS drv_circulation_loan_status; | ||
DROP MATERIALIZED VIEW IF EXISTS drv_inventory_item_status; | ||
DROP VIEW IF EXISTS drv_inventory_statistical_codes_full; | ||
|
||
CREATE MATERIALIZED VIEW drv_inventory_statistical_code_full AS | ||
CREATE VIEW drv_inventory_statistical_codes_full AS | ||
SELECT | ||
statcode.id AS "id", | ||
CONCAT(stattype.jsonb ->> 'name', ': ', statcode.jsonb ->> 'code', ' - ', statcode.jsonb ->> 'name') AS "statistical_code" | ||
FROM ${tenant_id}_mod_fqm_manager.src_inventory_statistical_code statcode | ||
JOIN ${tenant_id}_mod_fqm_manager.src_inventory_statistical_code_type stattype ON stattype.id::text = statcode.jsonb ->> 'statisticalCodeTypeId' | ||
WITH NO DATA; | ||
|
||
CREATE UNIQUE INDEX fqm_statistical_code_full_idx | ||
ON ${tenant_id}_mod_fqm_manager.drv_inventory_statistical_code_full(statistical_code); | ||
JOIN ${tenant_id}_mod_fqm_manager.src_inventory_statistical_code_type stattype ON stattype.id::text = statcode.jsonb ->> 'statisticalCodeTypeId'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters