Add a function to create tables.

This commit is contained in:
2024-03-27 16:16:49 +02:00
parent 5954224327
commit 3b70a1a497
+4
View File
@@ -14,3 +14,7 @@
[client]
(. client connect))
(defn create-tables
[client]
(. client query "CREATE TABLE IF NOT EXISTS articles (id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, content TEXT NOT NULL, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP);"))