Make a local directory for your app and in the new directory run npm init and follow the given promptsĪdd the following lines to your devDependencies in package.json (Note: delete or repurpose the pre-existing scripts value) Usage Bring an existing APEX app into source control An export ORACLE_HOME with an existing $ORACLE_HOME/jdbc/lib/jdbc6.jar (likely included in installation of Oracle Instant Client).An installation of Oracle Instant Client.An export APEX_HOME with $APEX_HOME/utilities/oracle/apex/*.class being the location of the above mentioned files.APEXExport.class and APEXExportSplitter.class which come with ( ) and above.To use them instead of sqlcl, you require: If you don't/can't use SQLcl, this also still supports the legacy tools from APEX 5. Will give the same result except for replacing absolute paths with relative paths in the scripts for git. Running apex export -skipExportDate -expOriginalIds -split -splitNoCheckSum -applicationid $apexappid This is obsolete now that SQLcl includes the application export functionality. Tested on Linux and OSX (Windows not supported).Any version-control tool can be used, not just git.Designed to be used by teams who want to bring their experience in version-control and APEX development together.Importing this new folder will then create an entirely separate live database.Introducing file-based version-control for Oracle Application Express apps! It is therefore possible to change the static data in the copied folder without effecting the development database. GitSQL uses the folder name as the database name. There is the option to copy the entire database folder and then prefix the copied folder with "Live_". GitSQL can be used to deploy directly from source control to a Live environment, but this should be done with caution as the static table data in source control may be different to what you require for the live environment. (Typically when you are resuming several months later, or you have a fresh development environment or you are coming into the project for the first time) Deploying a database to Live Multi developer environments will require database updates in order to keep up to date with the latest stream in GIT.Ī) Individual objects which have changed since your last GIT PULL.ī) Entire database when you have not got the database installed locally. Run a GIT Diff or review the changes using a visual diff tool before commiting the changes.Ĭommit the changes once you are happy that the changes are OK to go into source control. Note: You do not need to export the entire database this time - just the objects which you have changed. Run gitSQL and Export and select the relevant objects you wish to commit to source control.
Make a change to an object (or a set of objects) if it is applicable for the bug/issue/feature you are working on. You are now ready to make changes to SQL Server as part of your development cycle. You now have a base SQL Server database committed to GIT. Git commit -m "Initial revision of database X"Īlternatively - use a GIT client such as Source Tree Here is an example of what to run once gitSQL has finished exporting the database. HINT: Don't worry about folder names, try pointing to your root GIT repository directory - gitSQL will create a DB folder in there for you. Run gitSQL and export all objects into your git folder. Set up a new GIT repository or Clone an existing one which you wish to add the database to. This is a scenario where you have a database, or a base database that you wish to use on your project. Starting a new GIT repository with an existing Database
APEX SQL DEPLOY SQL FROM SOURCE CONTROL HOW TO
How to source control between SQL Server and GIT