diff options
-rw-r--r-- | module/vcomponent/data-stores/sqlite-alt.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/module/vcomponent/data-stores/sqlite-alt.scm b/module/vcomponent/data-stores/sqlite-alt.scm new file mode 100644 index 00000000..bf4d5706 --- /dev/null +++ b/module/vcomponent/data-stores/sqlite-alt.scm @@ -0,0 +1,26 @@ +(define (initialize-database db) + ;; TODO on delete/update cascade + + (sqlite-exec db " +CREATE TABLE IF NOT EXISTS components +( id TEXT PRIMARY KEY NOT NULL +, type TEXT NOT NULL +, parent INTEGER REFERENCES components(id) +)") + + (sqlite-exec db " +CREATE TABLE IF NOT EXISTS component_properties +( id INTEGER PRIMARY KEY NOT NULL +, component TEXT NOT NULL REFERENCES components(id) +, key TEXT NOT NULL +, value TEXT NOT NULL +) +") + + ;; TODO index on component_properties.component + ;; TODO index on component_properties.key + + + ;; TODO manually build indexes for components start and end times? + + ) |