Skip to content

Commit

Permalink
Updated supports method logic from rename column class to allow renam…
Browse files Browse the repository at this point in the history
…e action to be processed on sqlite newer versions
  • Loading branch information
MalloD12 committed Sep 12, 2022
1 parent efcc526 commit 4ac5a6e
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -3,6 +3,7 @@
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeFactory;
import liquibase.exception.DatabaseException;
import liquibase.exception.ValidationErrors;
import liquibase.sql.Sql;
import liquibase.sql.UnparsedSql;
Expand All @@ -16,7 +17,17 @@ public class RenameColumnGenerator extends AbstractSqlGenerator<RenameColumnStat

@Override
public boolean supports(RenameColumnStatement statement, Database database) {
return !(database instanceof SQLiteDatabase);
if(database instanceof SQLiteDatabase) {
try {
if(database.getDatabaseMajorVersion() <= 3 && database.getDatabaseMinorVersion() < 25) {
return false;
}
}
catch (DatabaseException e) {
throw new RuntimeException(e);
}
}
return true;
}

@Override
Expand Down

0 comments on commit 4ac5a6e

Please sign in to comment.