-- ===================================================================
-- MARS-1057: Install ODS.FILE_MANAGER_ODS Package Specification
-- ===================================================================
-- Purpose: Deploy FILE_MANAGER_ODS package specification v2.4.0
-- Author: Grzegorz Michalski
-- Date: 2026-02-18
-- Package: ODS.FILE_MANAGER_ODS
-- Version: 2.1.0 -> 2.4.0
-- Changes: Added CREATE_EXTERNAL_TABLES_SET and CREATE_EXTERNAL_TABLES_BATCH wrappers with pArea and pRestoreGrants parameters

SET ECHO ON
SET DEFINE OFF

PROMPT Installing ODS.FILE_MANAGER_ODS Package Specification v2.4.0...

@@new_version/FILE_MANAGER_ODS.pkg

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'
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 = 'PACKAGE';

PROMPT 
PROMPT FILE_MANAGER_ODS Package Specification installation completed.
PROMPT 

SET DEFINE ON

/
