Fix BASE_URL config loading, add tasks/projects; robust .env path resolution
- Config: try ENV_FILE, .env, ../.env for loading; trim trailing slash from BaseURL - Log BASE_URL at server startup for verification - .env.example: document BASE_URL - Tasks, projects, tags, migrations and related API/handlers Made-with: Cursor
This commit is contained in:
26
sqlc/queries/task_reminders.sql
Normal file
26
sqlc/queries/task_reminders.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- name: CreateTaskReminder :one
|
||||
INSERT INTO task_reminders (id, task_id, type, config, scheduled_at)
|
||||
VALUES ($1, $2, $3, COALESCE($4, '{}'), $5)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetTaskReminderByID :one
|
||||
SELECT * FROM task_reminders
|
||||
WHERE id = $1;
|
||||
|
||||
-- name: ListTaskReminders :many
|
||||
SELECT * FROM task_reminders
|
||||
WHERE task_id = $1
|
||||
ORDER BY scheduled_at ASC;
|
||||
|
||||
-- name: ListTaskRemindersDueBefore :many
|
||||
SELECT tr.*, t.owner_id, t.title
|
||||
FROM task_reminders tr
|
||||
JOIN tasks t ON t.id = tr.task_id
|
||||
WHERE tr.scheduled_at <= $1
|
||||
AND t.deleted_at IS NULL;
|
||||
|
||||
-- name: DeleteTaskReminder :exec
|
||||
DELETE FROM task_reminders WHERE id = $1;
|
||||
|
||||
-- name: DeleteTaskRemindersByTask :exec
|
||||
DELETE FROM task_reminders WHERE task_id = $1;
|
||||
Reference in New Issue
Block a user