mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-25 03:05:52 -05:00
Fixed bug with diffing column defaults
This commit is contained in:
committed by
Daylon Wilkins
parent
3e17e271d2
commit
31a9cf7e01
@@ -601,6 +601,7 @@ func dumbDownSchema(in schema.Schema) (schema.Schema, error) {
|
||||
err := allCols.Iter(func(tag uint64, col schema.Column) (stop bool, err error) {
|
||||
col.Name = strconv.FormatUint(tag, 10)
|
||||
col.Constraints = nil
|
||||
col.Default = ""
|
||||
dumbCols = append(dumbCols, col)
|
||||
|
||||
return false, nil
|
||||
@@ -813,7 +814,7 @@ func createSplitter(fromSch schema.Schema, toSch schema.Schema, joiner *rowconv.
|
||||
|
||||
unionSch, err = untyped.UntypedSchemaUnion(dumbNewSch, dumbOldSch)
|
||||
if err != nil {
|
||||
return nil, nil, errhand.BuildDError("Failed to merge schemas").Build()
|
||||
return nil, nil, errhand.BuildDError("Failed to merge schemas").AddCause(err).Build()
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -131,6 +131,7 @@ func (c Column) Equals(other Column) bool {
|
||||
c.Kind == other.Kind &&
|
||||
c.IsPartOfPK == other.IsPartOfPK &&
|
||||
c.TypeInfo.Equals(other.TypeInfo) &&
|
||||
c.Default == other.Default &&
|
||||
ColConstraintsAreEqual(c.Constraints, other.Constraints)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user