Top Description Fields Constructors Methods
liquibase.change.core

public Class CreateSequenceChange

extends AbstractChange
Class Inheritance
Annotations
@DatabaseChange
name:createSequence
description:Creates a new database sequence
priority:1
Imports
liquibase.change.*, liquibase.database.Database, liquibase.snapshot.SnapshotGeneratorFactory, liquibase.statement.SqlStatement, liquibase.statement.core.CreateSequenceStatement, liquibase.structure.core.Sequence, java.math.BigInteger

Creates a new sequence.

Field Summary

Modifier and TypeField and Description
private BigInteger
private String
private Boolean
private String
private BigInteger
private BigInteger
private BigInteger
private Boolean
private String
private String
private BigInteger
Inherited from liquibase.change.AbstractChange:
NODENAME_COLUMN

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ChangeStatus
checkStatus(Database database)

Overrides liquibase.change.AbstractChange.checkStatus.

Implements liquibase.change.Change.checkStatus.

Validate that this change executed successfully against the given database.

protected Change[]
createInverses()

Overrides liquibase.change.AbstractChange.createInverses.

Create inverse changes that can roll back this change.

public SqlStatement[]
generateStatements(Database database)

Implements liquibase.change.Change.generateStatements.

Generates the SqlStatement objects required to run the change for the given database.

public BigInteger
public String
public String
getConfirmationMessage()

Implements liquibase.change.Change.getConfirmationMessage.

Confirmation message to be displayed after the change is executed.

public Boolean
public String
public BigInteger
public BigInteger
public BigInteger
public String
public String
public String
public BigInteger
public Boolean
public void
public void
setCatalogName(String catalogName)

public void
public void
setDataType(String dataType)

public void
public void
public void
public void
public void
setSchemaName(String schemaName)

public void
setSequenceName(String sequenceName)

public void
Inherited from liquibase.change.AbstractChange:
createChangeMetaDatacreateChangeParameterMetadatacreateDescriptionMetaDatacreateEmptyColumnConfigcreateExampleValueMetaDatacreateMustEqualExistingMetaDatacreateRequiredDatabasesMetaDatacreateSerializationTypeMetaDatacreateSinceMetaDatacreateSupportedDatabasesMetaDatacustomLoadLogicequalsfinishInitializationgenerateCheckSumgenerateRollbackStatementsgenerateRollbackStatementsVolatilegenerateStatementsVolatilegetAffectedDatabaseObjectsgetChangeSetgetDescriptiongetExcludedFieldFiltersgetResourceAccessorgetSerializableFieldNamespacegetSerializableFieldsgetSerializableFieldTypegetSerializableFieldValuegetSerializedObjectNamehashCodeisInvalidPropertyloadmodifyserializeserializeValuesetChangeSetsetResourceAccessorshouldExecuteChangesupportssupportsRollbacktoStringvalidatewarn

Field Detail

cacheSizeback to summary
private BigInteger cacheSize
catalogNameback to summary
private String catalogName
cycleback to summary
private Boolean cycle
dataTypeback to summary
private String dataType
incrementByback to summary
private BigInteger incrementBy
maxValueback to summary
private BigInteger maxValue
minValueback to summary
private BigInteger minValue
orderedback to summary
private Boolean ordered
schemaNameback to summary
private String schemaName
sequenceNameback to summary
private String sequenceName
startValueback to summary
private BigInteger startValue

Constructor Detail

CreateSequenceChangeback to summary
public CreateSequenceChange()

Method Detail

checkStatusback to summary
public ChangeStatus checkStatus(Database database)

Overrides liquibase.change.AbstractChange.checkStatus.

Implements liquibase.change.Change.checkStatus.

Doc from liquibase.change.Change.checkStatus.

Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc.

Annotations
@Override
createInversesback to summary
protected Change[] createInverses()

Overrides liquibase.change.AbstractChange.createInverses.

Doc from liquibase.change.AbstractChange.createInverses.

Create inverse changes that can roll back this change. This method is intended to be overridden by Change implementations that have a logical inverse operation. Default implementation returns null.

If generateRollbackStatements(liquibase.database.Database) is overridden, this method may not be called.

Returns:Change[]

Return null if there is no corresponding inverse and therefore automatic rollback is not possible. Return an empty array to have a no-op rollback.

Annotations
@Override
generateStatementsback to summary
public SqlStatement[] generateStatements(Database database)

Implements liquibase.change.Change.generateStatements.

Doc from liquibase.change.Change.generateStatements.

Generates the SqlStatement objects required to run the change for the given database.

NOTE: This method may be called multiple times throughout the changelog execution process and may be called in documentation generation and other integration points as well.

If this method reads from the current database state or uses any other logic that will be affected by whether previous changeSets have ran or not, you must return true from generateStatementsVolatile.
Annotations
@Override
getCacheSizeback to summary
public BigInteger getCacheSize()
Annotations
@DatabaseChangeProperty
description:Number of values to fetch per query
getCatalogNameback to summary
public String getCatalogName()
Annotations
@DatabaseChangeProperty
since:3.0
description:Name of the database catalog
getConfirmationMessageback to summary
public String getConfirmationMessage()

Implements liquibase.change.Change.getConfirmationMessage.

Doc from liquibase.change.Change.getConfirmationMessage.

Confirmation message to be displayed after the change is executed. Should include relevant configuration settings to make it as helpful as possible. This method may be called outside the changelog execution process, such as in documentation generation.

Annotations
@Override
getCycleback to summary
public Boolean getCycle()
Annotations
@DatabaseChangeProperty
description:Whether the sequence cycles when it hits its max value
getDataTypeback to summary
public String getDataType()
Annotations
@DatabaseChangeProperty
description:Data type of the sequence
getIncrementByback to summary
public BigInteger getIncrementBy()
Annotations
@DatabaseChangeProperty
description:Interval between sequence numbers
exampleValue:2
getMaxValueback to summary
public BigInteger getMaxValue()
Annotations
@DatabaseChangeProperty
description:Maximum value of the sequence
exampleValue:1000
getMinValueback to summary
public BigInteger getMinValue()
Annotations
@DatabaseChangeProperty
description:Minimum value of the sequence
exampleValue:10
getSchemaNameback to summary
public String getSchemaName()
Annotations
@DatabaseChangeProperty
description:Name of the database schema
getSequenceNameback to summary
public String getSequenceName()
Annotations
@DatabaseChangeProperty
description:Name of the sequence to create
getSerializedObjectNamespaceback to summary
public String getSerializedObjectNamespace()

Overrides liquibase.change.AbstractChange.getSerializedObjectNamespace.

Implements liquibase.serializer.LiquibaseSerializable.getSerializedObjectNamespace.

Annotations
@Override
getStartValueback to summary
public BigInteger getStartValue()
Annotations
@DatabaseChangeProperty
description:First sequence number to be generated.
exampleValue:5
isOrderedback to summary
public Boolean isOrdered()
Annotations
@DatabaseChangeProperty
description:Whether the sequence is generated in the requested order
setCacheSizeback to summary
public void setCacheSize(BigInteger cacheSize)
setCatalogNameback to summary
public void setCatalogName(String catalogName)
setCycleback to summary
public void setCycle(Boolean cycle)
setDataTypeback to summary
public void setDataType(String dataType)
setIncrementByback to summary
public void setIncrementBy(BigInteger incrementBy)
setMaxValueback to summary
public void setMaxValue(BigInteger maxValue)
setMinValueback to summary
public void setMinValue(BigInteger minValue)
setOrderedback to summary
public void setOrdered(Boolean ordered)
setSchemaNameback to summary
public void setSchemaName(String schemaName)
setSequenceNameback to summary
public void setSequenceName(String sequenceName)
setStartValueback to summary
public void setStartValue(BigInteger startValue)