diff options
Diffstat (limited to 'migrations/013_source_config.sql')
| -rw-r--r-- | migrations/013_source_config.sql | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/migrations/013_source_config.sql b/migrations/013_source_config.sql new file mode 100644 index 0000000..7083d33 --- /dev/null +++ b/migrations/013_source_config.sql @@ -0,0 +1,13 @@ +-- Source configuration for selecting which items to fetch +CREATE TABLE IF NOT EXISTS source_config ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + source TEXT NOT NULL, -- 'trello', 'todoist', 'gcal', 'gtasks' + item_type TEXT NOT NULL, -- 'board', 'project', 'calendar', 'tasklist' + item_id TEXT NOT NULL, -- ID from the source + item_name TEXT NOT NULL, -- Display name + enabled INTEGER NOT NULL DEFAULT 1, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + UNIQUE(source, item_type, item_id) +); + +CREATE INDEX IF NOT EXISTS idx_source_config_source ON source_config(source, enabled); |
