@@ -132,10 +132,7 @@ func (this *Inspector) inspectOriginalAndGhostTables() (err error) {
132132 if err != nil {
133133 return err
134134 }
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 )
139136 for i , sharedUniqueKey := range sharedUniqueKeys {
140137 this .applyColumnTypes (this .migrationContext .DatabaseName , this .migrationContext .OriginalTableName , & sharedUniqueKey .Columns )
141138 uniqueKeyIsValid := true
@@ -731,7 +728,7 @@ func (this *Inspector) getCandidateUniqueKeys(tableName string) (uniqueKeys [](*
731728
732729// getSharedUniqueKeys returns the intersection of two given unique keys,
733730// 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 ) {
735732 // We actually do NOT rely on key name, just on the set of columns. This is because maybe
736733 // the ALTER is on the name itself...
737734 for _ , originalUniqueKey := range originalUniqueKeys {
@@ -741,7 +738,7 @@ func (this *Inspector) getSharedUniqueKeys(originalUniqueKeys, ghostUniqueKeys [
741738 }
742739 }
743740 }
744- return uniqueKeys , nil
741+ return uniqueKeys
745742}
746743
747744// getSharedColumns returns the intersection of two lists of columns in same order as the first list
0 commit comments