Package liquibase.exception

Examples of liquibase.exception.Warnings


   * liquibase.database.Database, liquibase.sqlgenerator.SqlGeneratorChain)
   */
  @Override
  public Warnings warn(ModifyDataTypeStatement modifyDataTypeStatement, Database database,
          SqlGeneratorChain sqlGeneratorChain) {
    Warnings warnings = super.warn(modifyDataTypeStatement, database, sqlGeneratorChain);

    if (database instanceof MySQLDatabase
            && !modifyDataTypeStatement.getNewDataType().toLowerCase().contains("varchar")) {
      warnings.addWarning("modifyDataType will lose primary key/autoincrement/not null settings for mysql."
              + "  Use <sql> and re-specify all configuration if this is the case");
    }

    return warnings;
  }
View Full Code Here


        return this;
    }

    @Override
    public Warnings warn(SqlStatement sqlStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
        return new Warnings();
    }
View Full Code Here

                return false;
            }

            @Override
            public Warnings warn(SqlStatement sqlStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
                return new Warnings();
            }

            @Override
            public ValidationErrors validate(SqlStatement sqlStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
                return new ValidationErrors();
View Full Code Here

        return super.supports(statement, database);
    }

    @Override
    public Warnings warn(ModifyDataTypeStatement modifyDataTypeStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
        Warnings warnings = super.warn(modifyDataTypeStatement, database, sqlGeneratorChain);

        if (database instanceof MySQLDatabase && !modifyDataTypeStatement.getNewDataType().toLowerCase().contains("varchar")) {
            warnings.addWarning("modifyDataType will lose primary key/autoincrement/not null settings for mysql.  Use <sql> and re-specify all configuration if this is the case");
        }

        return warnings;
    }
View Full Code Here

    }

    @Override
    public Warnings warn(CreateIndexStatement createIndexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {

        Warnings warnings = super.warn(createIndexStatement, database, sqlGeneratorChain);
        if (!(database instanceof MSSQLDatabase || database instanceof OracleDatabase || database instanceof DB2Database || database instanceof PostgresDatabase || database instanceof MockDatabase)) {
            if (createIndexStatement.isClustered() != null && createIndexStatement.isClustered()) {
                warnings.addWarning("Creating clustered index not supported with "+database);
            }
        }

        return warnings;
    }
View Full Code Here

        return sqlGenerators.next().generateSql(statement, database, this);
    }

    public Warnings warn(SqlStatement statement, Database database) {
        if (sqlGenerators == null || !sqlGenerators.hasNext()) {
            return new Warnings();
        }

        return sqlGenerators.next().warn(statement, database, this);
    }
View Full Code Here

        return "expectedQuotingStrategy";
    }

    @Override
    public Warnings warn(Database database) {
        return new Warnings();
    }
View Full Code Here

*/
public class NotPrecondition extends PreconditionLogic {

    @Override
    public Warnings warn(Database database) {
        return new Warnings();
    }
View Full Code Here

        this.expectedRows = expectedRows;
    }

    @Override
    public Warnings warn(Database database) {
        return new Warnings();
    }
View Full Code Here

        this.tableName = tableName;
    }

        @Override
        public Warnings warn(Database database) {
        return new Warnings();
    }
View Full Code Here

TOP

Related Classes of liquibase.exception.Warnings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.