mirror of
https://github.com/1f349/site-hosting.git
synced 2024-11-23 20:21:35 +00:00
21 lines
315 B
SQL
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 = ?;
|