Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

The Deployment Packager can be run from the CLI or the GUI. You provide a configuration file for the project that specifies the options to use during packaging. See Using the required deployPackager.properties file

Packaging Sources

You can package SQL scripts from the following sources.  

  • Source Code Management (SCM) Repository: Place SQL scripts in a defined location in a source code repository. Configure a properties file with information about source code management repositories where SQL scripts and the Datical DB Project reside. During processing, the Deployment Packager reads the properties file and gets the SQL scripts from the SCM. 
  • Manifest File: Define a manifest file to identify the SQL scripts to be processed and provide metadata about the scripts.  The manifest file is passed to the Deployment Packager.

Workflow

Deployment Packager uses the following workflow for changes checked into an SCM. When packaging with a manifest file, the manifest file specifies the files to package (steps 1 and 2 below). 

...

The following diagrams illustrate the workflow.  Click on an image to enlarge it:




CONVERT/ddl folder versus DIRECT/sql_direct folder


Info

If you use version 7.15 and later, use the DDL_DIRECT package method/ddl_direct folder instead of DIRECT package method/sql_direct folder.

The ddl_direct package method allows you to have more control over the processing order of scripts using the DIRECT package method so that scripts with DDL statements run before scripts with data changes that rely on those DDL changes.

You can use ddl_direct as follows:

  • A ddl_direct fixed folder name

  • A ddl_direct package method set for any other folder. You can set it using the metadata.properties file in any flexible folder where you want to use it: packageMethod=ddl_direct

An example of the new processing order for fixed folders: ddl, ddl_direct, view, function, procedure, package, packageBody, trigger, sql, sql_direct, data_dml.

An example of the new processing order when using flexible folders (where packageMethod is defined in metadata.properties): convert, ddl_direct, storedlogic, sqlfile, direct, data_dml.

If you use version 7.14 or earlier, refer to the following instructions.


...

If the order of the statements in the script is critical or if the script contains statements that would not be represented in a change set generated by diffing the before and after states of the database, you could instead package those scripts with the DIRECT method (which is used by default in the sql_direct folder). Scripts packaged with the DIRECT method in the sql_direct folder (or other folders that you have set to use the DIRECT packaging method) will run the actual script, thereby preserving the statements and the order of the statements.

Note that the possible drawback with using the DIRECT method/sql_direct folder with some configurations is losing some of the simulation/forecasting/modeling/profiling abilities that may happen with the CONVERT method/ddl folder. For Oracle you could use Datical's optional SQL Parser feature to add forecasting to the DIRECT method/sql_direct folder (or other folders that you have set to use the DIRECT packaging method).

...

Fixed Folder Names

Flexible Folder Names

Writing SQL Scripts for Datical DBLiquibase Enterprise

SQL Server Database Objects and Packaging

...