Package liquibase.exception

Examples of liquibase.exception.Warnings.addWarning()


          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(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

    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

TOP
Copyright © 2018 www.massapi.com. 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.