From 7ac90f8e99dbf763b0fe04a17d7eef19dd22cae8 Mon Sep 17 00:00:00 2001 From: grm Date: Fri, 18 Sep 2026 14:35:59 +0300 Subject: Revert "Special pages: a gallery page of the blog's images" This reverts commit 0fc470a. The feature was not wanted. Migration 00013 stays on disk because databases have already run it (goose refuses a missing applied migration); 00014 drops the column and table it added. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/db/migrations/blog/00014_drop_page_kind.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/db/migrations/blog/00014_drop_page_kind.sql (limited to 'internal/db') diff --git a/internal/db/migrations/blog/00014_drop_page_kind.sql b/internal/db/migrations/blog/00014_drop_page_kind.sql new file mode 100644 index 0000000..1bbf493 --- /dev/null +++ b/internal/db/migrations/blog/00014_drop_page_kind.sql @@ -0,0 +1,15 @@ +-- +goose Up +-- Special pages (00013) were dropped before release: the kind column and the +-- hidden-files table go, the migration stays so databases that ran it still +-- match the chain. +DROP TABLE page_hidden_files; +ALTER TABLE pages DROP COLUMN kind; + +-- +goose Down +ALTER TABLE pages ADD COLUMN kind text NOT NULL DEFAULT 'posts' + CHECK (kind IN ('posts', 'gallery')); +CREATE TABLE page_hidden_files ( + page_id bigint NOT NULL REFERENCES pages(id) ON DELETE CASCADE, + file_id uuid NOT NULL REFERENCES files(id) ON DELETE CASCADE, + PRIMARY KEY (page_id, file_id) +); -- cgit v1.2.3