aboutsummaryrefslogtreecommitdiffstats
path: root/internal/db/migrations/blog
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2026-09-18 11:22:25 +0300
committergrm <grm@eyesin.space>2026-09-18 11:22:25 +0300
commitac125593efe689fabd1e48a7023249c8973698b8 (patch)
treed7ee62adfd2260427383093ddf9956b2ef672598 /internal/db/migrations/blog
parentad30b38759dc222a7137598559998acbd0c06740 (diff)
downloadblogspace-ac125593efe689fabd1e48a7023249c8973698b8.tar.gz
blogspace-ac125593efe689fabd1e48a7023249c8973698b8.tar.bz2
blogspace-ac125593efe689fabd1e48a7023249c8973698b8.zip
Add switches to keep announcements off a page or off post pages
Announcements showed on every public page. Now each page has a "Show announcements on this page" checkbox (pages.show_notices, on by default) that covers the page and its posts, and the Design tab's Content section has "Show announcements on post pages" (theme.post_notices, on by default) for bloggers who want notices only on listings, not while reading a post. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A
Diffstat (limited to 'internal/db/migrations/blog')
-rw-r--r--internal/db/migrations/blog/00012_page_show_notices.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/db/migrations/blog/00012_page_show_notices.sql b/internal/db/migrations/blog/00012_page_show_notices.sql
new file mode 100644
index 0000000..da4ff3d
--- /dev/null
+++ b/internal/db/migrations/blog/00012_page_show_notices.sql
@@ -0,0 +1,7 @@
+-- +goose Up
+-- A per-page switch for the announcements: an "About" page can do without
+-- the notices the home page carries.
+ALTER TABLE pages ADD COLUMN show_notices boolean NOT NULL DEFAULT true;
+
+-- +goose Down
+ALTER TABLE pages DROP COLUMN show_notices;