com.atlassian.confluence.upgrade.ddl
Interface AlterTableExecutor

All Known Implementing Classes:
HibernateAlterTableExecutor

public interface AlterTableExecutor

Executes all the various database-specific table altering commands. PLEASE READ: Due to CONFDEV-7957 (and until HSQLDB addresses their concurrency issues), any upgrade tasks that composes this executor must be wrapped in a transaction proxy with REQUIRES_NEW propagation.

Since:
4.0

Method Summary
 void alterTable(java.lang.String tableName, java.util.List<? extends AlterTableCommand> commands)
          Perform a set of table altering actions on a given table.
 AddUniqueConstraintCommand createAddUniqueConstraintCommand(java.lang.String constraintName, java.lang.String... columnNames)
           
 AlterColumnNullabilityCommand createAlterColumnNullChoiceCommand(java.lang.String columnName, java.lang.String oldDataType, NullChoice nullChoice)
           
 DropUniqueConstraintCommand createDropUniqueConstraintCommand(java.lang.String constraintName)
           
 java.util.List<java.lang.String> getAlterTableStatements(java.lang.String tableName, java.util.List<? extends AlterTableCommand> commands)
           
 

Method Detail

createAlterColumnNullChoiceCommand

AlterColumnNullabilityCommand createAlterColumnNullChoiceCommand(java.lang.String columnName,
                                                                 java.lang.String oldDataType,
                                                                 NullChoice nullChoice)

createAddUniqueConstraintCommand

AddUniqueConstraintCommand createAddUniqueConstraintCommand(java.lang.String constraintName,
                                                            java.lang.String... columnNames)

createDropUniqueConstraintCommand

DropUniqueConstraintCommand createDropUniqueConstraintCommand(java.lang.String constraintName)

alterTable

void alterTable(java.lang.String tableName,
                java.util.List<? extends AlterTableCommand> commands)
Perform a set of table altering actions on a given table. On some databases such as PostgreSQL this is combined into a single statement automatically. On other databases such as HSQLDB, each alter action is executed as a separate statement.

Parameters:
tableName - Name of the table to alter
commands - A collection of alter table actions to perform

getAlterTableStatements

java.util.List<java.lang.String> getAlterTableStatements(java.lang.String tableName,
                                                         java.util.List<? extends AlterTableCommand> commands)


Copyright © 2003-2014 Atlassian. All Rights Reserved.