org.nuxeo.ecm.core.storage.sql.jdbc
Class TableUpgrader
java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.TableUpgrader
public class TableUpgrader
- extends Object
Helper to provide SQL migration calls while adding a column.
- Since:
- 5.4.2
Method Summary |
void |
add(String tableKey,
String columnName,
String sqlProcedure,
String testProp)
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)
Check if there is an added column that match with a upgrade process. |
TableUpgrader
public TableUpgrader(JDBCMapper mapper)
add
public void add(String tableKey,
String columnName,
String sqlProcedure,
String testProp)
- 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)
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
Copyright © 2011 Nuxeo SAS. All Rights Reserved.