diff options
Diffstat (limited to 'internal/db/migrations/blog/00007_post_image.sql')
| -rw-r--r-- | internal/db/migrations/blog/00007_post_image.sql | 7 |
1 files changed, 7 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; |
