Skip to Main Content

SQLcl: MCP Server & SQL Prompt

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!

Moving to SQLcl projects - issues with Original IDs

Simon_P24 hours ago — edited 24 hours ago

I have some confusion regarding APEX IDs when transitioning to SQLcl projects.

With a pre-SQLcl projects workflow, the steps would always be:

  1. Use APEX_APPLICATION_INSTALL.SET_OFFSET(<consistent offset value>) when installing the application
  2. Export using apex export -applicationid 100 -split -exporiginalids <other options>

This worked fine with many different developer environments.

As I transitioned to SQLcl projects, I used the option:

project config set -name export.apex.expOriginalIds -value true -verbose

And I can confirm in the project.config.json file that I had "expOriginalIds" : true,

Then I generated my artifact and deployed it successfully into a new environment.


But with subsequent APEX changes from that new environment, when I run project export I get all new component and item IDs.

I can confirm by querying the new database that the import_id_offset for the application is still set to my predetermined value. And I can also verify that I still have my pre-SQLcl projects IDs in view apex_application_page_items. But when I first run project export, they all change.

Interestingly, if I revert back to "expOriginalIds" : false, then the project export command does keep the original IDs. So overall this behaviour is the opposite of what one might expect.


Interestingly, with the expOriginalIds=false, I see that file …/supporting_objects/substitutions.yaml has the ID for the APP_NAME item changed from “<consistent offset value>-1” (why it's offset-1 is also perplexing) to “1”.

So overall, how to handle offset IDs when transitioning to SQLcl projects is confusing and the behaviour is not what I would have expected.

Advice, suggestions, or recommendations?

Ref:

  • SQLcl version: 25.2.0.0 build: 25.2.0.184.2054
  • APEX version 24.2.6
Comments
Post Details
Added 24 hours ago
0 comments
16 views