Class TableUpgrader
java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.TableUpgrader
Helper to provide SQL migration calls while adding a column.
- Since:
- 5.4.2
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a couple table/column associated with a sql procedure to be executed when the column is added and a a test flag to force his execution.void
upgrade
(String tableKey, List<Column> addedColumns, String ddlMode, SQLStatement.ListCollector ddlCollector) Check if there is an added column that match with a upgrade process.
-
Field Details
-
tableUpgrades
-
-
Constructor Details
-
TableUpgrader
-
-
Method Details
-
add
Add a couple table/column associated with a sql procedure to be executed when the column is added and a a test flag to force his execution.- Parameters:
tableKey
- table namecolumnName
- desired added columnsqlProcedure
- sql procedure nametestProp
- test flag name
-
upgrade
public void upgrade(String tableKey, List<Column> addedColumns, String ddlMode, SQLStatement.ListCollector ddlCollector) throws SQLException Check if there is an added column that match with a upgrade process. If one exists, it executes the associated sql in the category. If not, nothing happend.- Parameters:
tableKey
- table nameaddedColumns
- list of added column- Throws:
SQLException
- Exception thrown by JDBC
-