Add configuration table

This commit is contained in:
Zoe Roux
2024-08-27 00:47:58 +02:00
parent d285603716
commit dfc411e5f6
7 changed files with 95 additions and 7 deletions
+21
View File
@@ -0,0 +1,21 @@
-- name: LoadConfig :many
select
*
from
config;
-- name: SaveConfig :one
insert into config(key, value)
values ($1, $2)
on conflict (key)
do update set
value = excluded.value
returning
*;
-- name: DeleteConfig :one
delete from config
where key = $1
returning
*;