Done ticket GEPAFINBE-194

This commit is contained in:
nisha
2025-03-27 13:08:32 +05:30
parent 3b5bc00502
commit 4958dd549c
14 changed files with 450 additions and 32 deletions

View File

@@ -2675,4 +2675,9 @@
</insert>
</changeSet>
<changeSet id="25-03-2025_NK_160730" author="Nisha Kashyap">
<sqlFile dbms="postgresql"
path="db/dump/create_application_view.sql"/>
</changeSet>
</databaseChangeLog>

View File

@@ -13,10 +13,13 @@
BEGIN
-- Loop through all tables in the schema that have the 'updated_date' column
FOR r IN (
SELECT table_name
FROM information_schema.columns
WHERE column_name = 'updated_date'
AND table_schema = 'gepafin_schema'
SELECT c.table_name
FROM information_schema.columns c
JOIN information_schema.tables t
ON c.table_name = t.table_name AND c.table_schema = t.table_schema
WHERE c.column_name = 'updated_date'
AND c.table_schema = 'gepafin_schema'
AND t.table_type = 'BASE TABLE' -- Excludes views
)
LOOP
EXECUTE format(
@@ -30,10 +33,13 @@
-- Loop through all tables in the schema that have the 'created_date' column
FOR r IN (
SELECT table_name
FROM information_schema.columns
WHERE column_name = 'created_date'
AND table_schema = 'gepafin_schema'
SELECT c.table_name
FROM information_schema.columns c
JOIN information_schema.tables t
ON c.table_name = t.table_name AND c.table_schema = t.table_schema
WHERE c.column_name = 'created_date'
AND c.table_schema = 'gepafin_schema'
AND t.table_type = 'BASE TABLE' -- Excludes views
)
LOOP
EXECUTE format(