Added a database
This commit is contained in:
parent
ebaec3d296
commit
8136655336
35 changed files with 925 additions and 134 deletions
|
|
@ -4,9 +4,9 @@ SELECT * FROM publish_targets WHERE site_id = ?;
|
|||
-- name: InsertPublishTarget :one
|
||||
INSERT INTO publish_targets (
|
||||
site_id,
|
||||
publish_target_type,
|
||||
target_type,
|
||||
base_url,
|
||||
target_site_id,
|
||||
target_publish_key
|
||||
target_ref,
|
||||
target_key
|
||||
) VALUES (?, ?, ?, ?, ?)
|
||||
RETURNING id;
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
-- name: SelectSitesOwnedByUser :many
|
||||
SELECT * FROM sites WHERE owner_id = ?;
|
||||
|
||||
-- name: SelectSiteByID :one
|
||||
SELECT * FROM sites WHERE id = ?;
|
||||
|
||||
-- name: InsertSite :one
|
||||
INSERT INTO sites (
|
||||
owner_id,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
-- name: SelectUserByUsername :one
|
||||
SELECT * FROM users WHERE username = ?;
|
||||
|
||||
-- name: InsertUserByUsername :one
|
||||
INSERT INTO users (username, password) VALUES (?, ?) RETURNING id;
|
||||
-- name: InsertUser :one
|
||||
INSERT INTO users (username, password) VALUES (?, ?) RETURNING id;
|
||||
|
||||
-- name: UpdateUser :exec
|
||||
UPDATE users SET username = ?, password = ? WHERE id = ?;
|
||||
Loading…
Add table
Add a link
Reference in a new issue