@@ -132,10 +132,7 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
132
132
if err != nil {
133
133
return err
134
134
}
135
- sharedUniqueKeys , err := this .getSharedUniqueKeys (this .migrationContext .OriginalTableUniqueKeys , this .migrationContext .GhostTableUniqueKeys )
136
- if err != nil {
137
- return err
138
- }
135
+ sharedUniqueKeys := this .getSharedUniqueKeys (this .migrationContext .OriginalTableUniqueKeys , this .migrationContext .GhostTableUniqueKeys )
139
136
for i , sharedUniqueKey := range sharedUniqueKeys {
140
137
this .applyColumnTypes (this .migrationContext .DatabaseName , this .migrationContext .OriginalTableName , & sharedUniqueKey .Columns )
141
138
uniqueKeyIsValid := true
@@ -731,7 +728,7 @@ func (this *Inspector) getCandidateUniqueKeys(tableName string) (uniqueKeys [](*
731
728
732
729
// getSharedUniqueKeys returns the intersection of two given unique keys,
733
730
// testing by list of columns
734
- func (this * Inspector ) getSharedUniqueKeys (originalUniqueKeys , ghostUniqueKeys []( * sql.UniqueKey )) (uniqueKeys []( * sql.UniqueKey ), err error ) {
731
+ func (this * Inspector ) getSharedUniqueKeys (originalUniqueKeys , ghostUniqueKeys []* sql.UniqueKey ) (uniqueKeys []* sql.UniqueKey ) {
735
732
// We actually do NOT rely on key name, just on the set of columns. This is because maybe
736
733
// the ALTER is on the name itself...
737
734
for _ , originalUniqueKey := range originalUniqueKeys {
@@ -741,7 +738,7 @@ func (this *Inspector) getSharedUniqueKeys(originalUniqueKeys, ghostUniqueKeys [
741
738
}
742
739
}
743
740
}
744
- return uniqueKeys , nil
741
+ return uniqueKeys
745
742
}
746
743
747
744
// getSharedColumns returns the intersection of two lists of columns in same order as the first list
0 commit comments