保留覆盖的源码
This commit is contained in:
@@ -11,6 +11,7 @@ import liquibase.statement.DatabaseFunction;
|
||||
import liquibase.util.StringUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@DataTypeInfo(name = "boolean", aliases = {"java.sql.Types.BOOLEAN", "java.lang.Boolean", "bit", "bool"}, minParameters = 0, maxParameters = 0, priority = LiquibaseDataType.PRIORITY_DEFAULT)
|
||||
public class BooleanType extends LiquibaseDataType {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package liquibase.datatype.core;
|
||||
|
||||
import liquibase.database.Database;
|
||||
import liquibase.database.core.DmDatabase;
|
||||
import liquibase.datatype.DataTypeInfo;
|
||||
import liquibase.datatype.DatabaseDataType;
|
||||
|
||||
@DataTypeInfo(
|
||||
name = "boolean",
|
||||
aliases = {"java.sql.Types.BOOLEAN", "java.lang.Boolean", "bit", "bool"},
|
||||
minParameters = 0,
|
||||
maxParameters = 0,
|
||||
priority = 2
|
||||
)
|
||||
public class DmBooleanType extends BooleanType {
|
||||
|
||||
@Override
|
||||
public boolean supports(Database database) {
|
||||
if (database instanceof DmDatabase) {
|
||||
return true;
|
||||
}
|
||||
return super.supports(database);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseDataType toDatabaseDataType(Database database) {
|
||||
if (database instanceof DmDatabase) {
|
||||
return new DatabaseDataType("NUMBER", 1);
|
||||
}
|
||||
return super.toDatabaseDataType(database);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user