Creating a working copy in Oracle APEX allows you to safely develop and test enhancements without impacting the live version of your application. But once the updates are tested and finalized, the next crucial step is merging those changes back into the main application. This ensures your improvements are preserved and deployed into production. Oracle APEX provides built-in functionality to efficiently compare and merge a working copy with its parent application. By reviewing the differences before merging, developers can confirm which components have been changed, added, or removed—making it easy to manage updates with precision and confidence.
To merge changes from a working copy in Oracle APEX, begin by understanding what a working copy is. A working copy is a separate, editable clone of your main application used for making and testing changes without affecting the live version. Oracle APEX provides a structured environment for merging these changes back into the main application when they are ready.
Step-by-step process to merge changes:
-
Navigate to App Builder
From the APEX workspace home, go to App Builder. You will see a list of applications, including the original and its working copy. Working copies are identified with a small tag and often share the same name with a version indicator or suffix. -
Select the Working Copy
Click on the working copy application. This is the version where you've made development or design updates. -
Click on "Merge with Original"
In the Application home page of the working copy, look for the option "Merge with Original" in the Tasks pane. Clicking this opens the merge interface. -
Review the Differences
Oracle APEX will display a comparison screen that shows differences between the working copy and the original application. It breaks down changes by:-
Pages added or modified
-
Components added, changed, or deleted
-
Shared components
This allows you to thoroughly examine what has changed and determine if it’s safe to apply the updates.
-
-
Choose Merge Options
If everything looks good, click the Merge button. You may be asked to confirm or enter comments about the merge action. APEX will then apply the working copy changes to the original application. -
Verify the Merge
After the merge completes, go to the original application and review the updated components. Run the application to verify that the merged changes work as expected. -
Delete the Working Copy (Optional)
Once you’re sure the merge was successful, and there’s no further need for the working copy, you can delete it to keep the environment clean. Do this from the App Builder page by selecting the working copy and clicking Delete.
Tips:
-
Always test thoroughly in the working copy before merging.
-
Use descriptive comments when merging so others understand what changes were made.
-
Export your application before merging to keep a backup snapshot of the pre-merge version.
Merging changes from a working copy in Oracle APEX is a best practice that helps teams work more efficiently and with less risk. It supports controlled development cycles, making it easier to maintain stable, high-quality applications.
Once you're satisfied with the changes in the working copy:
Manually track the changes made in the copy.
Apply them to the original application by updating pages, components, or SQL scripts.
If needed, export the working copy and import it as a new version.
Manage Working Copy Data
A working copy does not automatically include production data. To work with realistic data:
Use a separate schema with sample/test data.
Clone production data into a test environment.
CREATE TABLE customers_copy AS SELECT * FROM customers;
Use Oracle APEX REST Synchronization to pull fresh data.
Keep Track of Changes
Since working copies are not automatically synced with the main application:
Document all changes in a shared space (e.g., Notion, Confluence, or a text file).
Use version control (Git, SVN) to track exported .sql files.
Enable APEX Application Feedback for team reviews
How Do I Test Changes Before Merging
Before merging a working copy:
Run comprehensive tests:
Functional testing (buttons, reports, forms).
Performance testing (APEX Debug Mode).
Security testing (Authentication & Session State protection).
Validate changes in different screen sizes (Responsive Design).
Check for JavaScript/PLSQL errors in APEX Debug Console.
Since working copies are separate, changes must be manually applied to the main app.
How to Merge a Working Copy into Production
Compare pages/components between the working copy and the live application.
Export required pages from the working copy:
App Builder > Export/Import > Export Pages
Import them into the main application.
Deploy in a Staging/UAT Environment for final testing.
Release to production during off-peak hours.
How Do I Delete Unused Working Copies
Once changes are merged, delete old working copies to keep the environment clean:
BEGIN
APEX_APPLICATION.DELETE_APPLICATION (p_application_id => 200);
END;
Alternatively, archive them in GitHub or a backup folder.
Final Thoughts: Best Practices Summary
Use working copies for major changes, not small fixes.
Follow a clear naming convention.
Use test data instead of modifying production data.
Track changes and use version control.
Thoroughly test before merging into the main application.
Delete old working copies after merging.
Merging changes from a working copy is a simple yet powerful step in maintaining application quality and version control. It minimizes risk by allowing selective review and ensures that the live application only receives fully vetted changes. This approach strengthens your overall development workflow, encourages safe experimentation, and provides clear visibility into what’s being deployed—helping teams deliver more reliable applications in Oracle APEX.
No comments:
Post a Comment