stash/pkg/sqlite/migrations/66_gallery_cover.up.sql
sezzim 68738bd227
Support for assigning any image from a gallery as the cover (#5053)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2024-08-29 11:24:52 +10:00

2 lines
No EOL
204 B
SQL

ALTER TABLE `galleries_images` ADD COLUMN `cover` BOOLEAN NOT NULL DEFAULT 0;
CREATE UNIQUE INDEX `index_galleries_images_gallery_id_cover` on `galleries_images` (`gallery_id`, `cover`) WHERE `cover` = 1;