Package org.apache.roller.util

Examples of org.apache.roller.util.SQLScriptRunner.runScript()


                // create roller tables

                SQLScriptRunner runner1 = new SQLScriptRunner(
                        databaseScriptsDir
                        + File.separator + "droptables.sql");
                runner1.runScript(conn, false);

                SQLScriptRunner runner = new SQLScriptRunner(
                        databaseScriptsDir
                        + File.separator + "derby"
                        + File.separator + "createdb.sql");
View Full Code Here


                SQLScriptRunner runner = new SQLScriptRunner(
                        databaseScriptsDir
                        + File.separator + "derby"
                        + File.separator + "createdb.sql");
                try {
                    runner.runScript(conn, true);
                } catch (Exception ignored) {
                    for (String message : runner.getMessages()) {
                        System.out.println(message);
                    }
                    ignored.printStackTrace();
View Full Code Here

                // drop Roller tables
                SQLScriptRunner runner = new SQLScriptRunner(
                        databaseScriptsDir
                        + File.separator + "droptables.sql");
                runner.runScript(conn, false);

                System.out.println("==============");
                System.out.println("Stopping Derby");
                System.out.println("==============");
               
View Full Code Here

        SQLScriptRunner create = null;
        try {
            con = db.getConnection();
            String handle = getDatabaseHandle(con);
            create = new SQLScriptRunner(scripts.getDatabaseScript(handle + "/createdb.sql"));
            create.runScript(con, true);
            messages.addAll(create.getMessages());
           
            setDatabaseVersion(con, version);
           
        } catch (SQLException sqle) {
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/120-to-130-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
           
            /*
             * The new theme management code is going into place and it uses
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/130-to-200-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
           
            successMessage("Doing upgrade to 200 ...");
            successMessage("Populating roller_user_permissions table");
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/200-to-210-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
           
            /*
             * For Roller 2.1.0 we are going to standardize some of the
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/210-to-230-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
        } catch (Exception e) {
            log.error("ERROR running 310 database upgrade script", e);
            if (runner != null) messages.addAll(runner.getMessages());
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/230-to-240-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
        } catch (Exception e) {
            log.error("ERROR running 310 database upgrade script", e);
            if (runner != null) messages.addAll(runner.getMessages());
View Full Code Here

            if (runScripts) {
                String handle = getDatabaseHandle(con);
                String scriptPath = handle + "/240-to-300-migration.sql";
                successMessage("Running database upgrade script: "+scriptPath);               
                runner = new SQLScriptRunner(scripts.getDatabaseScript(scriptPath));
                runner.runScript(con, true);
                messages.addAll(runner.getMessages());
            }
           
            /*
             * For Roller 3.0.0 we are allowing each weblogentry to track a
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.