Create user without confilct

This commit is contained in:
Magnus Åhall 2024-02-15 13:25:58 +01:00
parent 77f15a197a
commit f28b5188a6

View File

@ -274,6 +274,8 @@ func (db *T) CreateUser(username, password, name string) (userID int64, err erro
), ),
$3 $3
) )
ON CONFLICT (username) DO UPDATE
SET username = EXCLUDED.username
RETURNING id RETURNING id
`, `,
username, username,