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 Details

    • DropColumnSqlCommands

      public DropColumnSqlCommands(String... columnName)
  • Method Details

    • handle

      public void handle(JdbcTemplate jdbcTemplate, Connection connection)
      Overrides:
      handle in class org.springframework.cloud.dataflow.common.flyway.SqlCommand
    • canHandleInJdbcTemplate

      public boolean canHandleInJdbcTemplate()
      Overrides:
      canHandleInJdbcTemplate in class org.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