Done ticket GEPAFINBE-194
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user