保留覆盖的源码

This commit is contained in:
chenbowen
2026-02-03 10:36:45 +08:00
parent bd8d9646f5
commit 82ceb1f18b
8 changed files with 2478 additions and 17 deletions

View File

@@ -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 {

View File

@@ -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);
}
}