This directory structure is created by default when new projects are provisioned.
General
Project may consist of one or more products. While most of the ACE projects only consist of a single product, the directory structure has the flexibility to accomodate multiple.
Each product has directories for APEX application exports and database object directories. The database object directories contain the SQL code files to create or update those objects. Each product schema (core,api,pub) has its own object subdirectories.
The various Liquibase controller files are generated during the onboarding of a new project and should generally not need any editing.
The main entry points for running Liquibase are the install.sql and install_nonprod.sql scripts.
In general, developer should only update code files in the database object directories, and should export the APEX application into the corresponding directories of the product.
├── development
│ └── scripts (reset,debug, other ad-hoc scripts)
├── doc (markdown, images, etc)
├── gci_fixit (a directory with undo script generated by the Check-in tool.
│ This directory is part of .gitignore and not used in
│ the pipline nor deployment)
├── nonprod (not deployed to production)
│ ├── product1
│ │ ├── apex
│ │ │ ├── application (Application exports)
│ │ │ ├── script (miscellaneous scripts for APEX)
│ │ │ ├── sert_exceptions (exports of SERT exceptions)
│ │ │ ├── workspace
│ │ │ └── apexController.xml (controls order in which apps are installed)
│ │ ├── cypress (cypress test scripts)
│ │ └── db (database objects for various schemas)
│ │ ├── _dba (changelogs for DBA type tasks)
│ │ ├── product1_api (product specific API schema objects)
│ │ │ ├── constraint_fk
│ │ │ ├── constraint_other
│ │ │ ├── constraint_pk
│ │ │ ├── comments
│ │ │ ├── context
│ │ │ ├── function
│ │ │ ├── grant
│ │ │ ├── index
│ │ │ ├── job
│ │ │ ├── package_body
│ │ │ ├── package_spec
│ │ │ ├── post_install
│ │ │ ├── pre_install
│ │ │ ├── privilege
│ │ │ ├── procedure
│ │ │ ├── rest_module
│ │ │ ├── role
│ │ │ ├── schedule
│ │ │ ├── seed_data
│ │ │ ├── sequence
│ │ │ ├── synonym
│ │ │ ├── table
│ │ │ ├── temp_table
│ │ │ ├── trigger
│ │ │ ├── type
│ │ │ ├── view
│ │ │ └── schemaController.xml (controls the order in which database objects are installed)
│ │ ├── product1_code (product specific code schema objects)
│ │ │ └── [...] same as above
│ │ ├── product1_core (product specific core schema objects)
│ │ │ └── [...] same as above
│ │ └── product1_pub (product specific public schema objects)
│ │ └── [...] same as above
│ ├── product2
│ │ └── [...] same as product1 above
│ └── nonProdController.xml (controls the order in which products and schemas are installed)
├── product
│ ├── product1
│ │ ├── apex
│ │ │ ├── application
│ │ │ └── script
│ │ └── db
│ │ ├── _dba
│ │ ├── product1_api
│ │ │ └── [...] same as above
│ │ ├── product1_code
│ │ │ └── [...] same as above
│ │ ├── product1_core
│ │ │ └── [...] same as above
│ │ └── product1_pub
│ │ └── [...] same as above
│ ├── product2
│ │ └── [...] same as product1 above
│ └── productController.xml (controls the order in which products and schemas are installed)
├── README.md
├── _devController.xml (used for liquibase updates on feature branches)
├── apex_config.json (optional JSON file to control export locations for APEX exports. Created by ACE: Apex Export Application extension command.)
├── install.sql (main entry point for installing products)
├── install_nonprod.sql (main entry point for installing non-prod objects)
└── project.conf (configuration variables for pipeline)
The schemaController.xml file consists of includeAll directives for each database object directory. The directives are ordered with object dependency in mind.
Inside the various database object directories are the changelog files for the database objects. These are SQL formated changelogs, i.e. SQL or PL/SQL files with added Liquibase comments. The individual files do not need be saved in any particular order, as the schemaController.xml executes the database objects in the correct order.
The _dba directory does not contain subdirectories for individual database object types, in order to keep it less cluttered. However, since the changelogs in this directory are executed from the productController.xml with the includeAll directive, the files in this directory need to be named in such a way that they are naturally ordered correctly. For example:
- 0_create_users.sql
- 1_create_apex_workspace.sql
- 2_create_grants.sql
The productController.xml consists of include directives for the various schemaController.xml files. It executes the schemas in the following order:
- _dba
- core
- api
- code (if present)
- pub
The _devController.xml simply executes the nonProdController.xml followed by the prodController.xml. This is simply for the convenience of the developers working in their branch databases.
The install.sql is the main entry point for updating the product schemas and APEX applications. It is the one called during deployment in production targets.
The install_nonprod.sql is intended for development environment and, similarly to the _devController.xml, calls first the nonProdController.xml follwed by the productController.xml.
Feature Branch Development:
install_nonprod.sql (or _devController.xml)
└─> nonprod/nonProdController.xml
└─> <product 1>/_dba (includeAll)
└─> <product 1>/<name>_core/schemaController.xml (includeAll)
└─> <product 1>/<name>_api/schemaController.xml (includeAll)
└─> <product 1>/<name>_code/schemaController.xml (includeAll)
└─> <product 1>/<name>_pub/schemaController.xml (includeAll)
└─> <product 1>/apex/apexController.xml
└─> product/productController.xml
└─> <product 1>/_dba (includeAll)
└─> <product 1>/<name>_core/schemaController.xml (includeAll)
└─> <product 1>/<name>_api/schemaController.xml (includeAll)
└─> <product 1>/<name>_code/schemaController.xml (includeAll)
└─> <product 1>/<name>_pub/schemaController.xml (includeAll)
└─> <product 1>/apex/apexController.xml
Production Deployment:
install_nonprod.sql (or _devController.xml)
└─> product/productController.xml
└─> <product 1>/_dba (includeAll)
└─> <product 1>/<name>_core/schemaController.xml (includeAll)
└─> <product 1>/<name>_api/schemaController.xml (includeAll)
└─> <product 1>/<name>_code/schemaController.xml (includeAll)
└─> <product 1>/<name>_pub/schemaController.xml (includeAll)
└─> <product 1>/apex/apexController.xml