// Path: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java
// public static <T> T notNull(T argument, String argumentName) {
//     if (argument == null) {
//         throw new IllegalArgumentException("Argument " + argumentName + " must not be null.");
//     }
//     return argument;
// }
// 
// Path: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java
// public static String notNullOrEmpty(String argument, String argumentName) {
//     if (argument == null || argument.trim().isEmpty()) {
//         throw new IllegalArgumentException("Argument " + argumentName + " must not be null or empty.");
//     }
//     return argument;
// }


import static org.cognitor.cassandra.migration.util.Ensure.notNull;
import static org.cognitor.cassandra.migration.util.Ensure.notNullOrEmpty;
package org.cognitor.cassandra.migration;



/**
 * An object representing a database migration. Every script corresponds to one object of this class.
 *
 * @author Patrick Kranz
 */
class DbMigration {
    private final String migrationScript;
    private final String scriptName;
    private final int version;

    /**
     * Creates a new instance based on the given information.
     *
     * @param scriptName      the name of the script without the version part. Must not be null.
     * @param version         the schema version this migration will result to.
     * @param migrationScript the migration steps in cql. Must not be null.
     */
    public DbMigration(String scriptName, int version, String migrationScript) {
        this.migrationScript = notNull(migrationScript, "migrationScript");
// Path: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java
// public static <T> T notNull(T argument, String argumentName) {
//     if (argument == null) {
//         throw new IllegalArgumentException("Argument " + argumentName + " must not be null.");
//     }
//     return argument;
// }
// 
// Path: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/util/Ensure.java
// public static String notNullOrEmpty(String argument, String argumentName) {
//     if (argument == null || argument.trim().isEmpty()) {
//         throw new IllegalArgumentException("Argument " + argumentName + " must not be null or empty.");
//     }
//     return argument;
// }


// Path: cassandra-migration/src/main/java/org/cognitor/cassandra/migration/DbMigration.java
import static org.cognitor.cassandra.migration.util.Ensure.notNull;
import static org.cognitor.cassandra.migration.util.Ensure.notNullOrEmpty;

package org.cognitor.cassandra.migration;



/**
 * An object representing a database migration. Every script corresponds to one object of this class.
 *
 * @author Patrick Kranz
 */
class DbMigration {
    private final String migrationScript;
    private final String scriptName;
    private final int version;

    /**
     * Creates a new instance based on the given information.
     *
     * @param scriptName      the name of the script without the version part. Must not be null.
     * @param version         the schema version this migration will result to.
     * @param migrationScript the migration steps in cql. Must not be null.
     */
    public DbMigration(String scriptName, int version, String migrationScript) {
        this.migrationScript = notNull(migrationScript, "migrationScript");
        this.scriptName = notNullOrEmpty(scriptName, "scriptName");