WIP: App Settings

This commit is contained in:
aditya.chandel
2025-01-15 17:38:45 -07:00
parent 9313dad2c3
commit f0123c9776
23 changed files with 497 additions and 15 deletions
@@ -102,4 +102,13 @@ CREATE TABLE IF NOT EXISTS book_shelf_mapping
PRIMARY KEY (book_id, shelf_id),
CONSTRAINT fk_book_shelf_mapping_book FOREIGN KEY (book_id) REFERENCES book (id) ON DELETE CASCADE,
CONSTRAINT fk_book_shelf_mapping_shelf FOREIGN KEY (shelf_id) REFERENCES shelf (id) ON DELETE CASCADE
);
CREATE TABLE app_settings
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
category VARCHAR(255) NOT NULL,
key1 VARCHAR (255) NOT NULL,
value TEXT NOT NULL,
UNIQUE (category, key1)
);
@@ -1 +1,12 @@
INSERT INTO booklore.shelf (name, icon) VALUES ('Favorites', 'heart');
INSERT INTO booklore.shelf (name, icon)
VALUES ('Favorites', 'heart');
INSERT INTO app_settings (category, key1, value)
VALUES ('epub', 'theme', 'white'),
('epub', 'fontSize', '120'),
('epub', 'font', 'serif');
INSERT INTO app_settings (category, key1, value)
VALUES ('pdf', 'spread', 'even_spread'),
('pdf', 'zoom', 'page_fit'),
('pdf', 'sidebar', 'true');