Class MSSQLIndexExistsPrecondition

java.lang.Object
liquibase.serializer.AbstractLiquibaseSerializable
liquibase.precondition.AbstractPrecondition
com.atlassian.crowd.util.persistence.liquibase.ext.precondition.MSSQLIndexExistsPrecondition
All Implemented Interfaces:
liquibase.precondition.Precondition, liquibase.serializer.LiquibaseSerializable

public class MSSQLIndexExistsPrecondition extends liquibase.precondition.AbstractPrecondition
A custom precondition that verifies if index exists on MSSQL. With current version of liquibase 3.5.3 we cannot rely on default IndexExistsPrecondition because using it triggers running sql that breaks on MSSQL.

Although this class seems like it is not being used in Java, it is actually being scanned by liquibase. See CrowdSpringLiquibase for more details, where the liquibase ext package is declared.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable

    liquibase.serializer.LiquibaseSerializable.SerializationType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.slf4j.Logger
     

    Fields inherited from interface liquibase.serializer.LiquibaseSerializable

    GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    check(liquibase.database.Database database, liquibase.changelog.DatabaseChangeLog changeLog, liquibase.changelog.ChangeSet changeSet, liquibase.changelog.visitor.ChangeExecListener listener)
     
     
     
     
     
    void
    setIndexName(String indexName)
     
    void
    setTableName(String tableName)
     
    liquibase.exception.ValidationErrors
    validate(liquibase.database.Database database)
     
    liquibase.exception.Warnings
    warn(liquibase.database.Database database)
     

    Methods inherited from class liquibase.precondition.AbstractPrecondition

    getSerializedObjectName

    Methods inherited from class liquibase.serializer.AbstractLiquibaseSerializable

    convertEscaped, getSerializableFieldDataTypeClass, getSerializableFieldDataTypeClassParameters, getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, load, serialize, serializeValue, setSerializableFieldValue, shouldAutoLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface liquibase.serializer.LiquibaseSerializable

    getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, serialize

    Methods inherited from interface liquibase.precondition.Precondition

    load
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
  • Constructor Details

    • MSSQLIndexExistsPrecondition

      public MSSQLIndexExistsPrecondition()
  • Method Details

    • getName

      public String getName()
    • warn

      public liquibase.exception.Warnings warn(liquibase.database.Database database)
    • validate

      public liquibase.exception.ValidationErrors validate(liquibase.database.Database database)
    • check

      public void check(liquibase.database.Database database, liquibase.changelog.DatabaseChangeLog changeLog, liquibase.changelog.ChangeSet changeSet, liquibase.changelog.visitor.ChangeExecListener listener) throws liquibase.exception.PreconditionFailedException, liquibase.exception.PreconditionErrorException
      Throws:
      liquibase.exception.PreconditionFailedException
      liquibase.exception.PreconditionErrorException
    • getSerializedObjectNamespace

      public String getSerializedObjectNamespace()
    • getTableName

      public String getTableName()
    • setTableName

      public void setTableName(String tableName)
    • getIndexName

      public String getIndexName()
    • setIndexName

      public void setIndexName(String indexName)