generated from liquibase/liquibase-extension-example
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small bug fixes for liquibase 4.28 -- Parse url and add arrow settings for snapshots as well and raw commands -- Add binary data type
- Loading branch information
1 parent
aad85d3
commit cc91cda
Showing
6 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/liquibase/ext/databricks/datatype/BinaryDataTypeDatabricks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package liquibase.ext.databricks.datatype; | ||
|
||
import liquibase.change.core.LoadDataChange; | ||
import liquibase.database.Database; | ||
import liquibase.datatype.DataTypeInfo; | ||
import liquibase.datatype.DatabaseDataType; | ||
import liquibase.datatype.LiquibaseDataType; | ||
import liquibase.datatype.core.BlobType; | ||
import liquibase.ext.databricks.database.DatabricksDatabase; | ||
|
||
|
||
public class BinaryDataTypeDatabricks extends BlobType { | ||
|
||
|
||
@Override | ||
public DatabaseDataType toDatabaseDataType(Database database) { | ||
|
||
if (database instanceof DatabricksDatabase) { | ||
return new DatabaseDataType("BINARY"); | ||
} | ||
|
||
return super.toDatabaseDataType(database); | ||
} | ||
|
||
@Override | ||
public int getPriority() { | ||
return DatabricksDatabase.DATABRICKS_PRIORITY_DATABASE; | ||
} | ||
|
||
|
||
@Override | ||
public boolean supports(Database database) { | ||
return database instanceof DatabricksDatabase; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters