mirror of
https://github.com/flibusta-apps/users_settings_server.git
synced 2026-03-02 22:55:22 +01:00
Add default_search to user_settings
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.
This commit is contained in:
4
migrations/20240101000006_add_default_search_setting.sql
Normal file
4
migrations/20240101000006_add_default_search_setting.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- 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'));
|
||||
Reference in New Issue
Block a user