According to this example, if I do the same as what the example says, I'm getting an error.
await Account.insert(
Account(
number=account.number,
balance=account.balance,
token=account.token,
password=account.password,
device_id=account.device_id,
)
).on_conflict(
action="DO UPDATE",
target=Account.number, # Adding this will fix the error but not included in the example in the documentation.
values=[Account.token],
)
asyncpg.exceptions.PostgresSyntaxError: ON CONFLICT DO UPDATE requires inference specification or constraint name
HINT: For example, ON CONFLICT (column_name).