From e03bb9061103cb11cd3c55a32fa688bde8c01e3b Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Sat, 2 Sep 2023 02:16:42 +0200
Subject: [javascript] added contracts and agent database management

---
 nodejs/database/000_init.sql | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'nodejs/database/000_init.sql')

diff --git a/nodejs/database/000_init.sql b/nodejs/database/000_init.sql
index c06d2d3..9c06622 100644
--- a/nodejs/database/000_init.sql
+++ b/nodejs/database/000_init.sql
@@ -5,3 +5,12 @@ CREATE TABLE tokens (
 	id INTEGER PRIMARY KEY,
 	data TEXT NOT NULL
 );
+CREATE TABLE agents (
+	id INTEGER PRIMARY KEY,
+	data TEXT NOT NULL
+);
+CREATE TABLE contracts (
+	id INTEGER PRIMARY KEY,
+	data TEXT NOT NULL
+);
+CREATE UNIQUE INDEX contracts_data_id ON contracts (json_extract(data, '$.id'));
-- 
cgit v1.2.3

