File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ def delete params
104
104
. consumer_name_like ( params . consumer_name )
105
105
. provider_name_like ( params . provider_name )
106
106
. consumer_version_number_like ( params . consumer_version_number )
107
- . select_for_subquery ( Sequel [ :pact_publications ] [ :id ] )
107
+ . select_for_subquery ( Sequel [ :pact_publications ] [ :id ] . as ( :id ) )
108
108
unscoped ( PactPublication ) . where ( id : id ) . delete
109
109
end
110
110
Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ def select_all_qualified
44
44
end
45
45
46
46
def select_for_subquery column
47
- if mysql? #stoopid mysql doesn't allow subqueries
48
- select ( column ) . collect { | it | it [ column ] }
47
+ if mysql? #stoopid mysql doesn't allow you to modify datasets with subqueries
48
+ column_name = column . respond_to? ( :alias ) ? column . alias : column
49
+ select ( column ) . collect { | it | it [ column_name ] }
49
50
else
50
51
select ( column )
51
52
end
You can’t perform that action at this time.
0 commit comments