Package liquibase

Examples of liquibase.Liquibase.update()


            try {
                Connection connection = provider.getConnection();
                Liquibase liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database-drop.xml", new
                        ClassLoaderResourceAccessor(),
                        new JdbcConnection(connection));
                liquibase.update("");
                liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database.changelog.xml", new
                        ClassLoaderResourceAccessor(),
                        new JdbcConnection(connection));
                liquibase.update("");
            } catch (LiquibaseException e) {
View Full Code Here


                    Thread.sleep(1000);
                }
                if(liquibase.listLocks().length>0) {
                    liquibase.forceReleaseLocks();
                }
                liquibase.update("");
            }

            InjectHelper.injectMembers(this);

            // Add shutdown hook to exit cleanly after receiving a CTRL-C
View Full Code Here

                        new JdbcConnection(connection));
                liquibase.update("");
                liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database.changelog.xml", new
                        ClassLoaderResourceAccessor(),
                        new JdbcConnection(connection));
                liquibase.update("");
            } catch (LiquibaseException e) {
                e.printStackTrace();
                progressHandler.failed(getId(), e.getLocalizedMessage());
                return;
            } catch (SQLException e) {
View Full Code Here

    void execute(Connection connection) throws PluginException {
        try {
            Liquibase liquibase = new Liquibase("org/socialmusicdiscovery/server/database/sampledata/smd-database.sampledata.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");
        } catch (LiquibaseException e) {
            e.printStackTrace();
            throw new PluginException(getClass().getSimpleName() + " failure", e);
        }
    }
View Full Code Here

            progressHandler.progress(getId(),"Deleting database contents",1L,2L);
            Connection connection = provider.getConnection();
            Liquibase liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database-drop.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");
            progressHandler.progress(getId(), "Creating fresh database", 2L, 2L);
            liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database.changelog.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");
View Full Code Here

            liquibase.update("");
            progressHandler.progress(getId(), "Creating fresh database", 2L, 2L);
            liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database.changelog.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");
            progressHandler.finished(getId());
        } catch (LiquibaseException e) {
            progressHandler.failed(getId(),e.getMessage());
        } catch (SQLException e) {
            e.printStackTrace();
View Full Code Here

            Connection connection = provider.getConnection();
            Liquibase liquibase = new Liquibase("org/socialmusicdiscovery/server/database/smd-database.changelog.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            if (System.getProperty("liquibase") == null || !System.getProperty("liquibase").equals("false")) {
                liquibase.update("");
            }
            liquibase = new Liquibase("org/socialmusicdiscovery/server/database/sampledata/large/large.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");
View Full Code Here

                liquibase.update("");
            }
            liquibase = new Liquibase("org/socialmusicdiscovery/server/database/sampledata/large/large.xml", new
                    ClassLoaderResourceAccessor(),
                    new JdbcConnection(connection));
            liquibase.update("");

            // Ensure that we don't delete the database contents
            System.setProperty("hibernate.hbm2ddl.auto", "validate");
            System.out.println("Starting to update search relations...");
            SearchRelationPostProcessor searchRelationPostProcessor = new SearchRelationPostProcessor();
View Full Code Here

          if (dbType == DbType.DERBY || dbType == DbType.H2) {
            resourceAccessor = new ResourceAccessorFilter(resourceAccessor);
          }
         
          Liquibase liquibase = new Liquibase(changeLogResourceName, resourceAccessor, db);
          liquibase.update(null);
        } catch (Exception ex) {
          throw new JuRuntimeException("Couldn't run Liquibase change log " + changeLogResourceName, ex);
        }
      }
    });
View Full Code Here

              liquibase.setChangeLogParameter(key, parameters.get(key));
            }
          }

          // Run update
          liquibase.update((String)null);
        } catch (Exception ex) {
          throw new JuRuntimeException("Couldn't run Liquibase Update %s", ex, changeLogResourceName);
        }
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.