Package liquibase.statement.core

Examples of liquibase.statement.core.UnlockDatabaseChangeLogStatement


    Executor executor = ExecutorService.getInstance().getExecutor(database);
    try {
      if (database.hasDatabaseChangeLogLockTable()) {
        executor.comment("Release Database Lock");
        database.rollback();
        int updatedRows = executor.update(new UnlockDatabaseChangeLogStatement());
        if (updatedRows != 1) {
          throw new LockException("Did not update change log lock correctly.\n\n"
              + updatedRows
              + " rows were updated instead of the expected 1 row using executor "
              + executor.getClass().getName()
View Full Code Here


        super(new UnlockDatabaseChangeLogGenerator());
    }

    @Override
    protected UnlockDatabaseChangeLogStatement createSampleSqlStatement() {
        return new UnlockDatabaseChangeLogStatement();
    }
View Full Code Here

        return Arrays.asList(new CreateDatabaseChangeLogLockTableStatement());
    }
   
    @Test
    public void generateSql() throws Exception {
        this.statementUnderTest = new UnlockDatabaseChangeLogStatement();
        assertCorrect("update [databasechangeloglock] set [locked] = 0, [lockedby] = null, [lockgranted] = null where [id] = 1", MSSQLDatabase.class, SybaseDatabase.class);
        assertCorrect("update [databasechangeloglock] set [locked] = 0, [lockedby] = null, [lockgranted] = null where [id] = 1", MSSQLDatabase.class, SybaseASADatabase.class);
        assertCorrect("update [databasechangeloglock] set [locked] = 'f', [lockedby] = null, [lockgranted] = null where [id] = 1", InformixDatabase.class);
        assertCorrect("update [databasechangeloglock] set [locked] = false, [lockedby] = null, [lockgranted] = null where [id] = 1", PostgresDatabase.class, HsqlDatabase.class, H2Database.class);
        assertCorrectOnRest("update [databasechangeloglock] set [locked] = 0, [lockedby] = null, [lockgranted] = null where [id] = 1");
View Full Code Here

TOP

Related Classes of liquibase.statement.core.UnlockDatabaseChangeLogStatement

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.