|
|
@ -11,6 +11,11 @@
|
|
|
|
body ...)))))
|
|
|
|
body ...)))))
|
|
|
|
|
|
|
|
|
|
|
|
(define (create-tables)
|
|
|
|
(define (create-tables)
|
|
|
|
|
|
|
|
(when (not (file-exists? *db*))
|
|
|
|
|
|
|
|
(call-with-output-file *db*
|
|
|
|
|
|
|
|
(lambda (output-port)
|
|
|
|
|
|
|
|
;; Empty body, no content to write to the file
|
|
|
|
|
|
|
|
)))
|
|
|
|
(with-db (db)
|
|
|
|
(with-db (db)
|
|
|
|
(exec (sql db "create table if not exists users(id INTEGER PRIMARY KEY, username TEXT, email TEXT, password TEXT, salt TEXT);"))
|
|
|
|
(exec (sql db "create table if not exists users(id INTEGER PRIMARY KEY, username TEXT, email TEXT, password TEXT, salt TEXT);"))
|
|
|
|
(exec (sql db "create table if not exists sessions(bindings TEXT, session_id TEXT PRIMARY KEY);"))
|
|
|
|
(exec (sql db "create table if not exists sessions(bindings TEXT, session_id TEXT PRIMARY KEY);"))
|
|
|
|