From 1b1df83ffd68ff1a8c62fc7d6bef1a1fde19cb6b Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Sun, 17 Mar 2024 01:26:51 +0100
Subject: [javascript] Implementing market data gathering and caching

---
 nodejs/database/004_markets.sql | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 nodejs/database/004_markets.sql

(limited to 'nodejs/database/004_markets.sql')

diff --git a/nodejs/database/004_markets.sql b/nodejs/database/004_markets.sql
new file mode 100644
index 0000000..668e4d7
--- /dev/null
+++ b/nodejs/database/004_markets.sql
@@ -0,0 +1,7 @@
+CREATE TABLE markets (
+       id INTEGER PRIMARY KEY,
+       system TEXT NOT NULL,
+       data JSON NOT NULL
+);
+CREATE INDEX markets_system on markets (system);
+CREATE UNIQUE INDEX markets_symbol on markets(json_extract(data, '$.symbol'));
-- 
cgit v1.2.3

