stash/pkg/sqlite/migrations/86_scene_cover_image_source.up.sql
KennyG 0730983171 Add cover image source to Scene model and GraphQL schema
- Introduced `cover_image_source` field in the Scene type, SceneCreateInput, and SceneUpdateInput to track the origin of cover images.
- Updated the GraphQL schema and corresponding resolver logic to handle the new field.
- Implemented default cover image source logic in the resolver for scene creation and updates.
- Added migration to include `cover_image_source` column in the scenes table.
- Enhanced UI components to support the new cover image source functionality, including updates to SceneEditPanel and SceneDetails.
2026-04-26 10:52:52 -04:00

10 lines
384 B
SQL

ALTER TABLE `scenes` ADD COLUMN `cover_image_source` text CHECK (
`cover_image_source` IS NULL
OR `cover_image_source` = 'default'
OR `cover_image_source` = 'clipboard'
OR `cover_image_source` = 'userscript'
OR `cover_image_source` LIKE 'url:%'
OR `cover_image_source` LIKE 'stash:%'
OR `cover_image_source` LIKE 'timestamp:%'
OR `cover_image_source` LIKE 'file:%'
);