-- ===================================================================
-- MARS-1057: Rollback ODS.FILE_MANAGER_ODS Package Body
-- ===================================================================
-- Purpose: Restore FILE_MANAGER_ODS package body to v2.1.0
-- Author: Grzegorz Michalski
-- Date: 2026-02-18
-- Package: ODS.FILE_MANAGER_ODS
-- Version: 2.4.0 -> 2.1.0 (rollback)

SET ECHO ON
SET DEFINE OFF

PROMPT Rolling back ODS.FILE_MANAGER_ODS Package Body to v2.1.0...

@@rollback_version/FILE_MANAGER_ODS.pkb

PROMPT Checking for compilation errors...
SELECT 
    LINE,
    POSITION,
    TEXT AS ERROR_MESSAGE
FROM ALL_ERRORS
WHERE OWNER = 'ODS'
  AND NAME = 'FILE_MANAGER_ODS'
  AND TYPE = 'PACKAGE BODY'
ORDER BY SEQUENCE;

PROMPT Verifying package status...
SELECT 
    OBJECT_NAME,
    OBJECT_TYPE,
    STATUS,
    TO_CHAR(LAST_DDL_TIME, 'YYYY-MM-DD HH24:MI:SS') AS LAST_MODIFIED
FROM ALL_OBJECTS
WHERE OWNER = 'ODS'
  AND OBJECT_NAME = 'FILE_MANAGER_ODS'
  AND OBJECT_TYPE IN ('PACKAGE', 'PACKAGE BODY')
ORDER BY OBJECT_TYPE;

PROMPT 
PROMPT FILE_MANAGER_ODS Package Body rollback completed.
PROMPT 

SET DEFINE ON

/
