Package liquibase.change.core

Examples of liquibase.change.core.CreateSequenceChange


        super(DropSequenceChange.class);
    }

    @Override
    public Change[]  prepareDatabase(DropSequenceChange change) throws DatabaseException {
        CreateSequenceChange createSequenceChange = new CreateSequenceChange();
        createSequenceChange.setCatalogName(change.getCatalogName());
        createSequenceChange.setSchemaName(change.getSchemaName());
        createSequenceChange.setSequenceName(change.getSequenceName());

        return new Change[] {createSequenceChange };
    }
View Full Code Here


        super(AlterSequenceChange.class);
    }

    @Override
    public Change[]  prepareDatabase(AlterSequenceChange change) throws DatabaseException {
        CreateSequenceChange createSequenceChange = new CreateSequenceChange();
        createSequenceChange.setCatalogName(change.getCatalogName());
        createSequenceChange.setSchemaName(change.getSchemaName());
        createSequenceChange.setSequenceName(change.getSequenceName());

        return new Change[] {createSequenceChange };
    }
View Full Code Here

    @Override
    public Change[] fixMissing(DatabaseObject missingObject, DiffOutputControl control, Database referenceDatabase, Database comparisonDatabase, ChangeGeneratorChain chain) {
        Sequence sequence = (Sequence) missingObject;

        CreateSequenceChange change = new CreateSequenceChange();
        change.setSequenceName(sequence.getName());
        if (control.getIncludeCatalog()) {
            change.setCatalogName(sequence.getSchema().getCatalogName());
        }
        if (control.getIncludeSchema()) {
            change.setSchemaName(sequence.getSchema().getName());
        }
        change.setStartValue(sequence.getStartValue());
        change.setIncrementBy(sequence.getIncrementBy());
        change.setMinValue(sequence.getMinValue());
        change.setMaxValue(sequence.getMaxValue());
        change.setCacheSize(sequence.getCacheSize());
        change.setCycle(sequence.getWillCycle());
        change.setOrdered(sequence.getOrdered());

        return new Change[] { change };

    }
View Full Code Here

        super(RenameSequenceChange.class);
    }

    @Override
    public Change[]  prepareDatabase(RenameSequenceChange change) throws Exception {
        CreateSequenceChange createSequenceChange = new CreateSequenceChange();
        createSequenceChange.setCatalogName(change.getCatalogName());
        createSequenceChange.setSchemaName(change.getSchemaName());
        createSequenceChange.setSequenceName(change.getOldSequenceName());

        return new Change[] {createSequenceChange };
    }
View Full Code Here

TOP

Related Classes of liquibase.change.core.CreateSequenceChange

Copyright © 2018 www.massapicom. 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.