feat: create tag dialog (#814)

This commit is contained in:
boojack
2022-12-21 23:59:03 +08:00
committed by GitHub
parent e4a8a4d708
commit 68a77b6e1f
16 changed files with 361 additions and 47 deletions

View File

@@ -87,7 +87,9 @@ func upsertTag(ctx context.Context, tx *sql.Tx, upsert *api.TagUpsert) (*tagRaw,
name, creator_id
)
VALUES (?, ?)
ON CONFLICT(name, creator_id) DO NOTHING
ON CONFLICT(name, creator_id) DO UPDATE
SET
name = EXCLUDED.name
RETURNING name, creator_id
`
var tagRaw tagRaw