|
|
@ -74,7 +74,7 @@ defmodule Explorer.Chain.Import.Runner.StakingPoolsDelegators do |
|
|
|
|
|
|
|
|
|
|
|
defp default_on_conflict do |
|
|
|
defp default_on_conflict do |
|
|
|
from( |
|
|
|
from( |
|
|
|
name in StakingPoolsDelegator, |
|
|
|
delegator in StakingPoolsDelegator, |
|
|
|
update: [ |
|
|
|
update: [ |
|
|
|
set: [ |
|
|
|
set: [ |
|
|
|
stake_amount: fragment("EXCLUDED.stake_amount"), |
|
|
|
stake_amount: fragment("EXCLUDED.stake_amount"), |
|
|
@ -82,8 +82,8 @@ defmodule Explorer.Chain.Import.Runner.StakingPoolsDelegators do |
|
|
|
max_withdraw_allowed: fragment("EXCLUDED.max_withdraw_allowed"), |
|
|
|
max_withdraw_allowed: fragment("EXCLUDED.max_withdraw_allowed"), |
|
|
|
max_ordered_withdraw_allowed: fragment("EXCLUDED.max_ordered_withdraw_allowed"), |
|
|
|
max_ordered_withdraw_allowed: fragment("EXCLUDED.max_ordered_withdraw_allowed"), |
|
|
|
ordered_withdraw_epoch: fragment("EXCLUDED.ordered_withdraw_epoch"), |
|
|
|
ordered_withdraw_epoch: fragment("EXCLUDED.ordered_withdraw_epoch"), |
|
|
|
inserted_at: fragment("LEAST(?, EXCLUDED.inserted_at)", name.inserted_at), |
|
|
|
inserted_at: fragment("LEAST(?, EXCLUDED.inserted_at)", delegator.inserted_at), |
|
|
|
updated_at: fragment("GREATEST(?, EXCLUDED.updated_at)", name.updated_at) |
|
|
|
updated_at: fragment("GREATEST(?, EXCLUDED.updated_at)", delegator.updated_at) |
|
|
|
] |
|
|
|
] |
|
|
|
] |
|
|
|
] |
|
|
|
) |
|
|
|
) |
|
|
|