add reading settings sync
This commit is contained in:
@@ -0,0 +1 @@
|
||||
ALTER TABLE users DROP COLUMN IF EXISTS reading_prefs;
|
||||
@@ -0,0 +1,15 @@
|
||||
-- Adds per-user reading preferences (theme palette, font family, font
|
||||
-- size, justification toggle) so the prefs roam across devices once the
|
||||
-- user signs in.
|
||||
--
|
||||
-- Stored as JSONB rather than a column-per-field — the shape is owned
|
||||
-- by the frontend (components/reading-settings.tsx), changes
|
||||
-- occasionally (new palettes added every now and then), and we never
|
||||
-- query individual keys server-side. JSONB keeps the schema stable as
|
||||
-- the shape evolves.
|
||||
--
|
||||
-- Default `'{}'::jsonb` so existing rows are not nulled and the
|
||||
-- frontend can treat the server response as "merge into local defaults"
|
||||
-- without an additional null check.
|
||||
ALTER TABLE users
|
||||
ADD COLUMN IF NOT EXISTS reading_prefs JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||
Reference in New Issue
Block a user