Closed jeffry-luqman closed 1 year ago
ok, I've fixed it with isUncastableDefaultValue
method, If there are other types that have the same problem, we just need to fill in this method.
ok, I've fixed it with
isUncastableDefaultValue
method, If there are other types that have the same problem, we just need to fill in this method.
Can we combine genUsingExpression and isUncastableDefaultValue? They will only work if you need to specify the conversion type.
pseudo code
if specifiedType, isAuto := autoConversion(...); !isAuto {
// delete if has default value
// use `USING column::xxx::xxx`
} else {
// use `USING column::xxx`
}
i have fixed it using ModifyColumn
and DropDefaultValue
method, what do you think?
OK, I've fixed it to modifyColumn
Hi @jeffry-luqman
Can you fix the conflict? thank you.
Hi @jeffry-luqman
Can you fix the conflict? thank you.
✅ Done
What did this pull request do?
drop existing default value to
AlterColumn
before change column type. Without this, it will report error as I described in the issue #180User Case Description
We used migrator to change column data type