Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Supporting Objects - Install or upgrade

partlycloudyFeb 2 2022 — edited Feb 2 2022

APEX 21.2
Supporting objects is a under-utilized feature of APEX. We're starting to use it more.
Question - When an app with supporting object scripts is imported using SQL*Plus and the export was generated with p_supporting_objects = I (install on import), how does APEX determine whether the Install scripts are run or the Upgrade scripts? I see that the Upgrade scripts have a condition, a SQL statement that should return TRUE in order for the Upgrade scripts to execute.
But an import always deletes an application before importing it and supporting object scripts are executed after the import so when would the Install set of scripts run?
Application Version 1 is deployed with Install scripts to create tables, views, packages, etc. - Which scripts are used, Install or Upgrade?
Application Version 2 is deployed with changes to app metadata and database objects - Which scripts are used, Install or Upgrade?
...
In general, do we need to delete the supporting objects scripts from prior deployments and only retain the most recent version that goes with the app code? Or is there a way to retain all the history in the app export file and comment out scripts from prior versions?
The Install feature has an option to create a script based on a database object (table, view, package, etc), the upgrade does not. Why is this?
There is a Refresh button to refresh the source code when script is based on a database object DDL. Is there a way to keep this always refreshed, clicking a button is a manual task that is best avoided.
Can someone please explain the lifecycle of how these scripts are supposed to be used?
Thanks

This post has been answered by AndyH on Feb 2 2022
Jump to Answer
Comments
Post Details
Added on Feb 2 2022
8 comments
2,470 views