Versions Compared

Key

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

Table of Contents


Using Flexible Folders

...

Using this capability, you may use any number of arbitrarily named folders under a <sql_code> root. This enables you to use folder names that are meaningful to your environment or instructive to your end users.

When you use flexible folders, the folders containing SQL code must have a metadata.properties file, even if it is blank.

You need to specify two properties (new to version 5.0) in a metadata.properties file in the folder when using flexible folder namesThey These properties explicitly specify packaging behavior that was implicit for code in that can be different than the defaults that are implicit with fixed-name folders.

  • packageMethod - specifies how to package code in this folder
  • rerunnable - specify whether this code can be repackaged (updated in place)

...

OrderSQLFileTypepackageMethod
1ddlCONVERT
2ddl_directDDL_DIRECT
3viewSTOREDLOGIC
4ssisSSIS
5ssis_project

SSIS

6functionSTOREDLOGIC
7procedureSTOREDLOGIC
8packageSTOREDLOGIC
9packagebodySTOREDLOGIC
10triggerSTOREDLOGIC
11sqlSQLFILE
12sqlplusDIRECT
13sql_directDIRECT
14data_dmlDATA_DML

...

Normally DDL changes are placed in folders that use the CONVERT packaging method. However, when you need to package complex and interdependent changes, place them in a folder that uses the DDL_DIRECT or DIRECT packaging method instead. 

If the order that the multiple statements are listed in the single script is critical to the success of the script, then use the DDL_DIRECT or DIRECT packaging method. The DDL_DIRECT or DIRECT packaging method will preserve the order of the statements in the script. (The CONVERT packaging method may not preserve the order because it creates the change sets by doing a diff of before and after snapshots, and that comparison process does not know the original order of the statements.)

...

SQLFileTypeResources folder
DDLN/A
DDL_DIRECTddl_direct
VIEWview
SSISssis
SSIS_PROJECTssis_project
FUNCTIONfunction
PROCEDUREprocedure
PACKAGEpackage
PACKAGEBODYpackagebody
TRIGGERtrigger
SQLsql
SQLPLUSsql
SQL_DIRECTsql
DATA_DMLdata_dml

...

  • CONVERT (convert)
  • STOREDLOGIC (native)
  • DIRECT (native)
  • DDL_DIRECT (native)
  • DATA_DML (native)
  • SQLFILE (native)
  • SSIS (native)

...

Fixed FolderRerunnable default setting
ddlfalse
ddl_directfalse
data_dmlfalse
sql_direct

false

sqlfalse
sqlplusfalse
proceduretrue
packagetrue
packagebodytrue
functiontrue
triggertrue
viewtrue

...

Set versionStrategy to deployAll or deployLatest:

  • deployAll - deploy all eligible versions in the order they appear in changelog.xml. This is the default.
  • deployLatest - deploy only the latest eligible version.


See also these pages for an overview of packager workflows, guidelines for writing scripts, and when to use which folder or packaging method:

Overview of Packaging

Writing SQL Scripts for Datical DBLiquibase Enterprise

Oracle Database Objects and Packaging

...