feat: refactor models to improve type handling and enhance error management across migration processes
This commit is contained in:
@@ -42,3 +42,29 @@ func (c *ColumnType) Nullable() bool {
|
||||
func (c *ColumnType) Type() string {
|
||||
return c.unifiedType
|
||||
}
|
||||
|
||||
func NewColumnType(
|
||||
name string,
|
||||
hasMaxLength bool,
|
||||
hasPrecisionScale bool,
|
||||
userType string,
|
||||
systemType string,
|
||||
unifiedType string,
|
||||
nullable bool,
|
||||
maxLength int64,
|
||||
precision int64,
|
||||
scale int64,
|
||||
) ColumnType {
|
||||
return ColumnType{
|
||||
name,
|
||||
hasMaxLength,
|
||||
hasPrecisionScale,
|
||||
userType,
|
||||
systemType,
|
||||
unifiedType,
|
||||
nullable,
|
||||
maxLength,
|
||||
precision,
|
||||
scale,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user