Skip to Main Content
Feature Request FR-2455
Product Area APIs
Status DELIVERED

18 Voters

apex_application_install.set_application_version procedure

jan.winkels Public
· Apr 21 2022

Idea Summary
A procedure similar to set_application_alias or set_application_name to set the value for ‘Version’ in Application Definition.

Use Case
Set version information during deployment automatically.

Preferred Solution (Optional)
A procedure called set_application_version to set the attribute Version in Application Definition.

This has been delivered in Oracle APEX 23.1!

Comments

Comments

  • mark.daems OP 2.7 years ago

    Very useful for all scenarios where you don't want to manually update version+export+import all applications for each release. 

    • When you want all apex apps behave together as one app with one version
    • When the exact version number should be derived from the version control system or CI/CD pipeline
  • yuri_slutsky OP 2.7 years ago

    I assume that there is no need to install for a later version, Apex has compatibility, at least in later versions. The problem is if the import importing from 21 to 20 done, for example. 

    But set_version will not help here, because parameters have been added that were not in the previous version. 

    I thought to write something in Python that will process the export file and add these parameters with default values.

  • mark.daems OP 2.7 years ago

    Oh, ik was talking about setting the version number of your own application, not the Apex version you used to develop it

  • duncan.mein OP 2.7 years ago

    This would be great. I would also extend to ask for support of all editable application attributes in apex_application_install. A classic use case is copying an application, but you want to change any number of the attributes (friendly urls, logging, debugging, compatibility mode etc).

  • yuri_slutsky OP 2.7 years ago

    Sorry, I've not understood the question

  • duncan.mein OP 2.7 years ago

    I  guess what I am asking for is a load more procedures in the package: apex_application_install

    So when I am copying an application, I can do this:

    declare
       --
       l_app_to_copy  apex_t_export_files;
       l_info         apex_application_install.t_file_info;
       --
    begin
    --
        -- Currently Supported Procedures:
       l_app_to_copy := apex_export.get_application ( 100 );
       apex_application_install.set_workspace_id ( 1234556789 );
       apex_application_install.generate_application_id;
       apex_application_install.generate_offset;
       apex_application_install.set_schema( 'MY_SCHEMA' );
       apex_application_install.set_application_alias( 'MY_ALIAS' );
       -- 
       -- What I would also like:
       apex_application_install.set_version ( '1.0.0 (Beta Copy)' );
       apex_application_install.set_group ('New Group Name');
       apex_application_install.use_friendly_urls ('N');
       apex_application_install.enable_debug ('Y');
       apex_application_install.enable_logging ('N');
       apex_application_install.compatibility_mode ('22.1');
       -- .
       -- .
       -- .
       -- (Add procedurs for all application attributes)
        
       -- Now install the copied application with attributes set
       apex_application_install.install( p_source => l_app_to_copy );
    --
    end;
    /
    

    I hope this makes sense.

    Cheers,

    Duncs

  • mark.daems OP 2.7 years ago

    It makes perfect sense, though I would opt for only one procedure: set_application_attribute(attribute_name varchar2, value varchar2). Keeps the way open for new attributes in future versions and when non existing attributes are simply ignored scripts can be 'backward compatible' with all apex versions after the procedure was introduced.