Table of Contents |
---|
In some cases you may need to override the default packaging behavior for SQL script processing order.
...
- Place a
metadata.properties
file in the top of the SQL code tree. It must correspond to the directory specified in the sqlScmSQLBaseDir property in thedeployPackager.properties
file. - Use the folderOrder property in that
metadata.properties
file to specify a list of folders. Files in the folder are pulled to the front of the list of files to package, ahead of files in other directories. . (Note that if you use custom folderOrder, the commit time will not be considered as part of the overall ordering.)
Examples: Specifying Packaging in a Multiple Schema Project
Each entry in the comma-separated list of values in the folderOrder property is used as a filter on the path to the file.
- Files matching the filter are moved to the front of the list of files to package. The process is repeated for each value, in order.
- The sorting takes place after the baseline packaging order is determined using the packageOrderStrategy property.
- Any file in the list that does not match one of the filters is processed after the ordered files and according to the packageOrderStrategy setting
- This method is intended as an extension to be used with the PACKAGEMETHOD and ALPHANUMERIC strategies. (It is not intended to be used with DEFAULT stategy.)
SQL Code Folder Organization and Packaging Strategy for the Examples
...
Code Block | ||
---|---|---|
| ||
PACKAGING ORDER FOR COMMIT FILES: --------------------------------- packageOrderStrategy: PACKAGEMETHOD folderOrder: COMMIT ID PACKAGE METHOD FILENAME/ROLLBACKFILE da62531 convert schema1\constraints\SCHEMA1_FKS.sql da62531 convert schema1\constraints\SCHEMA1_PK_UQ_CONSTRAINTS.sql da62531 convert schema1\indexes\SCHEMA1_I_NAME.sql da62531 convert schema1\tables\SCHEMA1_T_BORROWING.sql da62531 convert schema1\tables\SCHEMA1_T_CUSTOMER.sql da62531 convert schema1\tables\SCHEMA1_T_CUSTOMER_RATING.sql da62531 convert schema1\tables\SCHEMA1_T_EXEMPLAR.sql da62531 convert schema1\tables\SCHEMA1_T_FILM.sql da62531 convert schema1\tables\SCHEMA1_T_GENRE.sql da62531 convert schema1\tables\SCHEMA1_T_MEDIUM.sql da62531 convert schema1\tables\SCHEMA1_T_ORDER.sql da62531 convert schema2\constraints\SCHEMA2_FKS.sql da62531 convert schema2\constraints\SCHEMA2_PK_UQ_CONSTRAINTS.sql da62531 convert schema2\indexes\SCHEMA2_I_NAME.sql da62531 convert schema2\tables\SCHEMA2_T_BORROWING.sql da62531 convert schema2\tables\SCHEMA2_T_CUSTOMER.sql da62531 convert schema2\tables\SCHEMA2_T_CUSTOMER_RATING.sql da62531 convert schema2\tables\SCHEMA2_T_EXEMPLAR.sql da62531 convert schema2\tables\SCHEMA2_T_FILM.sql da62531 convert schema2\tables\SCHEMA2_T_GENRE.sql da62531 convert schema2\tables\SCHEMA2_T_MEDIUM.sql da62531 convert schema2\tables\SCHEMA2_T_ORDER.sql da62531 ddl_direct schema2\complex_tables\SCHEMA1_N_CUSTOMER.sql da62531 storedlogic schema1\views\SCHEMA1_V_CUSTOMER.sql da62531 storedlogic schema1\views\SCHEMA1_V_CUSTOMER_HAS_FILM.sql da62531 storedlogic schema2\views\SCHEMA2_V_CUSTOMER.sql da62531 storedlogic schema2\views\SCHEMA2_V_CUSTOMER_HAS_FILM.sql da62531 direct schema1\grants\SCHEMA1_GRANT_SELECT.sql da62531 direct schema1\types\SCHEMA1_UDTS.sql da62531 direct schema2\types\SCHEMA2_UDTS.sql |
...
Code Block | ||
---|---|---|
| ||
PACKAGING ORDER FOR COMMIT FILES:
---------------------------------
packageOrderStrategy: PACKAGEMETHOD
folderOrder: types
COMMIT ID PACKAGE METHOD FILENAME/ROLLBACKFILE
da62531 direct schema1\types\SCHEMA1_UDTS.sql
da62531 direct schema2\types\SCHEMA2_UDTS.sql
// ------------------------------------------------------------------------------------------'types' have moved from the bottom to the top of the Packaging Order
da62531 convert schema1\constraints\SCHEMA1_FKS.sql
da62531 convert schema1\constraints\SCHEMA1_PK_UQ_CONSTRAINTS.sql
da62531 convert schema1\indexes\SCHEMA1_I_NAME.sql
da62531 convert schema1\tables\SCHEMA1_T_BORROWING.sql
da62531 convert schema1\tables\SCHEMA1_T_CUSTOMER.sql
da62531 convert schema1\tables\SCHEMA1_T_CUSTOMER_RATING.sql
da62531 convert schema1\tables\SCHEMA1_T_EXEMPLAR.sql
da62531 convert schema1\tables\SCHEMA1_T_FILM.sql
da62531 convert schema1\tables\SCHEMA1_T_GENRE.sql
da62531 convert schema1\tables\SCHEMA1_T_MEDIUM.sql
da62531 convert schema1\tables\SCHEMA1_T_ORDER.sql
da62531 convert schema2\constraints\SCHEMA2_FKS.sql
da62531 convert schema2\constraints\SCHEMA2_PK_UQ_CONSTRAINTS.sql
da62531 convert schema2\indexes\SCHEMA2_I_NAME.sql
da62531 convert schema2\tables\SCHEMA2_T_BORROWING.sql
da62531 convert schema2\tables\SCHEMA2_T_CUSTOMER.sql
da62531 convert schema2\tables\SCHEMA2_T_CUSTOMER_RATING.sql
da62531 convert schema2\tables\SCHEMA2_T_EXEMPLAR.sql
da62531 convert schema2\tables\SCHEMA2_T_FILM.sql
da62531 convert schema2\tables\SCHEMA2_T_GENRE.sql
da62531 convert schema2\tables\SCHEMA2_T_MEDIUM.sql
da62531 convert schema2\tables\SCHEMA2_T_ORDER.sql
da62531 ddl_direct schema2\complex_tables\SCHEMA1_N_CUSTOMER.sql
da62531 storedlogic schema1\views\SCHEMA1_V_CUSTOMER.sql
da62531 storedlogic schema1\views\SCHEMA1_V_CUSTOMER_HAS_FILM.sql
da62531 storedlogic schema2\views\SCHEMA2_V_CUSTOMER.sql
da62531 storedlogic schema2\views\SCHEMA2_V_CUSTOMER_HAS_FILM.sql
da62531 direct schema1\grants\SCHEMA1_GRANT_SELECT.sql |
...