Class DropColumnSqlCommands
java.lang.Object
org.springframework.cloud.dataflow.common.flyway.SqlCommand
org.springframework.cloud.dataflow.server.db.migration.DropColumnSqlCommands
public class DropColumnSqlCommands
extends org.springframework.cloud.dataflow.common.flyway.SqlCommand
Utility class that can be used in future to drop columns.
This checks for the existence of the column before dropping.
- Author:
- Corneil du Plessis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected voiddropColumn(JdbcTemplate jdbcTemplate, Connection connection, String name) voidhandle(JdbcTemplate jdbcTemplate, Connection connection) protected booleanhasColumn(Connection connection, String schemaName, String tableName, String columnName) Methods inherited from class org.springframework.cloud.dataflow.common.flyway.SqlCommand
from, from, getCommand, getSuppressedErrorCodes
-
Constructor Details
-
DropColumnSqlCommands
-
-
Method Details
-
handle
- Overrides:
handlein classorg.springframework.cloud.dataflow.common.flyway.SqlCommand
-
canHandleInJdbcTemplate
public boolean canHandleInJdbcTemplate()- Overrides:
canHandleInJdbcTemplatein classorg.springframework.cloud.dataflow.common.flyway.SqlCommand
-
dropColumn
protected void dropColumn(JdbcTemplate jdbcTemplate, Connection connection, String name) throws SQLException - Throws:
SQLException
-
hasColumn
protected boolean hasColumn(Connection connection, String schemaName, String tableName, String columnName) throws SQLException - Throws:
SQLException
-