View Issue Details

IDProjectCategoryView StatusLast Update
0001153SymmetricDSBugpublic2013-04-26 13:11
ReporterborballAssigned To 
Status newResolutionopen 
Product Version3.3.4 
Target VersionFixed in Version 
Summary0001153: Drop tables in Database failed
DescriptionCan not drop tables when call API: public void alterDatabase(Database desiredDatabase, boolean continueOnError) in org.jumpmind.db.platform.IDatabasePlatform
Steps To Reproduce1. create one table in datasource with IDatabasePlatform.createTables()
2. drop the table with :
        Database oldDatabase = readDatabase(dataSource);
        for (Table table : tables) {
        getDatabasePlatform(dataSource).alterDatabase(oldDatabase, false);
3. The table is still there.
Additional InformationPotension issues in Code: org.jumpmind.db.platform.AbstractDatabasePlatform
public void alterTables(boolean continueOnError, Table... desiredTables) {
        Database currentDatabase = new Database();
        Database desiredDatabase = new Database();
        StringBuilder tablesProcessed = new StringBuilder();
        for (Table table : desiredTables) {
            tablesProcessed.append(", ");
            Table currentTable = ddlReader.readTable(table.getCatalog(), table.getSchema(),
            if (currentTable != null) {

        if (tablesProcessed.length() > 1) {
            tablesProcessed.replace(tablesProcessed.length() - 2, tablesProcessed.length(), "");

        String alterSql = ddlBuilder.alterDatabase(currentDatabase, desiredDatabase);

        if (StringUtils.isNotBlank(alterSql.trim())) {
  "Running alter sql:\n{}", alterSql);
            String delimiter = getDdlBuilder().getDatabaseInfo().getSqlCommandDelimiter();
            new SqlScript(alterSql, getSqlTemplate(), !continueOnError, false, false, delimiter, null).execute();
        } else {
  "Tables up to date. No alters found for {}", tablesProcessed);




2013-04-26 13:11

administrator   ~0000248

This was intentional. We are only processing the tables specified in the database. We could probably clean up the api to allow the entire database to be diffed and to generate drops.

Issue History

Date Modified Username Field Change
2013-03-31 05:27 borball New Issue
2013-04-26 13:11 chenson Note Added: 0000248