bluebell/database/queries/sites.sql
2024-08-16 16:48:50 +01:00

21 lines
315 B
SQL

-- name: GetSiteBySlug :one
SELECT *
FROM sites
WHERE slug = ?
LIMIT 1;
-- name: GetSiteByDomain :one
SELECT *
FROM sites
WHERE domain = ?
LIMIT 1;
-- name: EnableDomain :exec
INSERT INTO sites (slug, domain, token)
VALUES (?, ?, ?);
-- name: DeleteDomain :exec
UPDATE sites
SET enable = false
WHERE domain = ?;