Use new UpdateAssignmentWithDifference for ynab-import to prevent errors on duplicates
This commit is contained in:
1 parent
a62ab543b0
commit
97de326527
3 files changed
+33
-5
No files matched your search
@@ -29,4 +29,11 @@ INSERT INTO assignments (category_id, date, amount)
|
||||
VALUES($1, $2, $3)
|
||||
ON CONFLICT (category_id, date)
|
||||
DO
|
||||
UPDATE SET amount = $3;
|
||||
UPDATE SET amount = $3;
|
||||
|
||||
-- name: UpdateAssignmentWithDifference :exec
|
||||
INSERT INTO assignments (category_id, date, amount)
|
||||
VALUES($1, $2, $3)
|
||||
ON CONFLICT (category_id, date)
|
||||
DO
|
||||
UPDATE SET amount = assignments.amount + $3;
|
||||
Reference in new issue
Block a user