Skip to content

Commit

Permalink
Update String Type to remove unnecessary conditional and fix createTa…
Browse files Browse the repository at this point in the history
…ble advanced expected unit test
  • Loading branch information
CodyAustinDavis committed Nov 22, 2023
1 parent e60c5c4 commit d59b891
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,10 @@ public boolean supports(Database database) {
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof DatabricksDatabase) {

DatabaseDataType type = new DatabaseDataType("STRING", this.getParameters());
if (this.getParameters().length == 0) {
type.setType("STRING");
} else {
String firstParameter = String.valueOf(this.getParameters()[0]);
int stringSize = Integer.parseInt(firstParameter);
if (stringSize == 65535) {
type.setType("STRING");
}
else {
type.setType("STRING");
}
}
DatabaseDataType type = new DatabaseDataType("STRING");

type.setType("STRING");

return type;
} else {
return super.toDatabaseDataType(database);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-- liquibase formatted sql

CREATE TABLE test_table_xml (test_column INT(10));
CREATE TABLE test_table_xml (test_column INT);

0 comments on commit d59b891

Please sign in to comment.