Skip to content

Commit 9cba6f2

Browse files
sql/ydb: tried to fix diff logic again
1 parent c3bfab8 commit 9cba6f2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sql/ydb/diff.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,8 @@ func (d *diff) defaultChanged(from *schema.Column, to *schema.Column) bool {
130130
// IndexAttrChanged reports if the index attributes were changed.
131131
func (*diff) IndexAttrChanged(from, to []schema.Attr) bool {
132132
var fromAttrs, toAttrs IndexAttributes
133-
hasFrom, hasTo := sqlx.Has(from, &fromAttrs), sqlx.Has(to, &toAttrs)
134-
135-
if hasFrom != hasTo {
136-
return true
137-
}
138-
if !hasFrom {
139-
return false
140-
}
133+
sqlx.Has(from, &fromAttrs)
134+
sqlx.Has(to, &toAttrs)
141135

142136
if fromAttrs.Async != toAttrs.Async {
143137
return true

0 commit comments

Comments
 (0)