mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2026-03-02 22:55:22 +01:00
Add migration to add a nullable VARCHAR(32) column with a CHECK constraint restricting values to book, author, series, translator. Update SQLx query artifacts, handlers, and serializers to read and write the new field.
5 lines
261 B
SQL
5 lines
261 B
SQL
-- Add default search setting: NULL = not selected, or one of: book, author, series, translator
|
|
ALTER TABLE user_settings
|
|
ADD COLUMN default_search VARCHAR(32) NULL
|
|
CHECK (default_search IS NULL OR default_search IN ('book', 'author', 'series', 'translator'));
|