diff options
Diffstat (limited to 'internal/db/migrations/blog')
| -rw-r--r-- | internal/db/migrations/blog/00007_post_image.sql | 7 | ||||
| -rw-r--r-- | internal/db/migrations/blog/00008_page_outro.sql | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/internal/db/migrations/blog/00007_post_image.sql b/internal/db/migrations/blog/00007_post_image.sql new file mode 100644 index 0000000..75858a4 --- /dev/null +++ b/internal/db/migrations/blog/00007_post_image.sql @@ -0,0 +1,7 @@ +-- +goose Up +-- A post's featured image: a library image shown as a thumbnail on listings +-- and on the post page. Deleting the file just unsets it. +ALTER TABLE posts ADD COLUMN image uuid REFERENCES files(id) ON DELETE SET NULL; + +-- +goose Down +ALTER TABLE posts DROP COLUMN image; diff --git a/internal/db/migrations/blog/00008_page_outro.sql b/internal/db/migrations/blog/00008_page_outro.sql new file mode 100644 index 0000000..e795df0 --- /dev/null +++ b/internal/db/migrations/blog/00008_page_outro.sql @@ -0,0 +1,9 @@ +-- +goose Up +-- A page can carry text after its posts as well as before them, in the same +-- format as the intro (one format column per page). +ALTER TABLE pages + ADD COLUMN outro_md text NOT NULL DEFAULT '', + ADD COLUMN outro_html text NOT NULL DEFAULT ''; + +-- +goose Down +ALTER TABLE pages DROP COLUMN outro_md, DROP COLUMN outro_html; |
