Fix postgresql query for deleting auth expiry job
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Solid Queue uses a text column, instead of a jsonb, so we need to cast it as jsonb on the fly.
This commit is contained in:
parent
5a523fd220
commit
a97bbf61a8
@ -78,7 +78,7 @@ class RemoteStorageAuthorization < ApplicationRecord
|
|||||||
when /sqlite/
|
when /sqlite/
|
||||||
query.where("json_extract(arguments, '$.arguments') = ?", job_args.to_json)
|
query.where("json_extract(arguments, '$.arguments') = ?", job_args.to_json)
|
||||||
when /postgres/
|
when /postgres/
|
||||||
query.where("arguments->>'arguments' = ?", job_args.to_json)
|
query.where("CAST(arguments AS jsonb)->>'arguments' = ?", job_args.to_json)
|
||||||
else
|
else
|
||||||
raise "Unsupported database adapter"
|
raise "Unsupported database adapter"
|
||||||
end.destroy_all
|
end.destroy_all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user