com.builtamont.cassandra.migration.api.MigrationState.kt Maven / Gradle / Ivy
/**
* File : MigrationState.kt
* License :
* Original - Copyright (c) 2010 - 2016 Boxfuse GmbH
* Derivative - Copyright (c) 2016 - 2017 Citadel Technology Solutions Pte Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.builtamont.cassandra.migration.api
/**
* The state of a migration.
*
* @param displayName The name suitable for display to the end-user.
* @param isResolved Flag indicating if this migration is available.
* @param isApplied Flag indicating if this migration has been applied or not.
* @param isFailed Flag indicating if this migration has failed when it was applied or not.
*/
enum class MigrationState(
val displayName: String,
val isResolved: Boolean,
val isApplied: Boolean,
val isFailed: Boolean
) {
/** This migration has not been applied yet. */
PENDING("Pending", true, false, false),
/** This migration has not been applied yet, and won't be applied because target is set to a lower version. */
ABOVE_TARGET(">Target", true, false, false),
/** This migration was not applied against this DB, because the metadata table was baselined with a higher version. */
BELOW_BASELINE("