Have got publishing to Netlify
This commit is contained in:
parent
8e0ffb6c24
commit
7ef6725bdb
23 changed files with 667 additions and 109 deletions
|
|
@ -1,6 +1,12 @@
|
|||
-- name: ListPosts :many
|
||||
SELECT * FROM post WHERE site_id = $1 ORDER BY post_date DESC LIMIT 25;
|
||||
|
||||
-- name: ListPublishablePosts :many
|
||||
SELECT *
|
||||
FROM post
|
||||
WHERE id > $1 AND site_id = $2 AND state = 'published' AND post_date <= $3
|
||||
ORDER BY id LIMIT 100;
|
||||
|
||||
-- name: InsertPost :one
|
||||
INSERT INTO post (
|
||||
site_id,
|
||||
|
|
|
|||
12
sql/queries/targets.sql
Normal file
12
sql/queries/targets.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- name: ListPublishTargetsOfRole :many
|
||||
SELECT * FROM publish_target WHERE site_id = $1 AND role = 'production';
|
||||
|
||||
-- name: InsertPublishTarget :one
|
||||
INSERT INTO publish_target (
|
||||
site_id,
|
||||
role,
|
||||
target_type,
|
||||
url,
|
||||
target_ref
|
||||
) VALUES ($1, $2, $3, $4, $5)
|
||||
RETURNING id;
|
||||
Loading…
Add table
Add a link
Reference in a new issue