diff options
Diffstat (limited to 'migrations')
| -rw-r--r-- | migrations/012_feature_toggles.sql | 15 | ||||
| -rw-r--r-- | migrations/013_source_config.sql | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/migrations/012_feature_toggles.sql b/migrations/012_feature_toggles.sql new file mode 100644 index 0000000..db74588 --- /dev/null +++ b/migrations/012_feature_toggles.sql @@ -0,0 +1,15 @@ +-- Feature toggles for gradual rollout and experimentation +CREATE TABLE IF NOT EXISTS feature_toggles ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL UNIQUE, + description TEXT, + enabled INTEGER NOT NULL DEFAULT 0, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) +); + +-- Insert some initial toggles +INSERT OR IGNORE INTO feature_toggles (name, description, enabled) VALUES + ('source_config', 'Configure which boards/lists/calendars to fetch from each source', 0), + ('calendar_timeline', 'Show timeline as a calendar view with time slots', 0), + ('completed_log', 'Track and display completed tasks log', 1); 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); |
