commit 191ec01e735700ca589041ae63a924564589d5c4 Author: ryyst Date: Sun Feb 1 21:03:36 2026 +0200 Enchanting tiger diff --git a/idea.md b/idea.md new file mode 100644 index 0000000..a77747e --- /dev/null +++ b/idea.md @@ -0,0 +1,41 @@ +To have vim style CRUD for alarms in sqlite database. + +The database scheme: +""" +CREATE TABLE alarms ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + description TEXT, + time TEXT, -- HH:MM format for simple alarms + trigger TEXT NOT NULL, -- Cron expression or 'once' + sound_path TEXT NOT NULL, + enabled BOOLEAN DEFAULT 1, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + last_triggered TIMESTAMP, + snooze_count INTEGER DEFAULT 0 +); + +CREATE TABLE alarm_history ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + alarm_id INTEGER, + triggered_at TIMESTAMP, + dismissed_at TIMESTAMP, + snoozed_count INTEGER, + FOREIGN KEY (alarm_id) REFERENCES alarms(id) +); + +CREATE TABLE settings ( + key TEXT PRIMARY KEY, + value TEXT +); +""" + +To be run in Linux terminals. +Needs to have a list of existing alarms. + +Needs way to: +1. create alarms to the database (add) +2. read alarms that are in the database (view) +3. update alarms that are in the database (edit) +4. delete alarms from the database (delete)