From fb2adbb65087252c0fd0392c8fa8f0218bffa22b Mon Sep 17 00:00:00 2001
From: Physcik <mynameisgennadiy@vk.com>
Date: Fri, 26 Dec 2025 20:08:28 +0500
Subject: Articles idnexing

---
 db.sql | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 db.sql

(limited to 'db.sql')

diff --git a/db.sql b/db.sql
new file mode 100644
index 0000000..06db73b
--- /dev/null
+++ b/db.sql
@@ -0,0 +1,19 @@
+CREATE TABLE Articles (
+	Id INTEGER PRIMARY KEY AUTOINCREMENT, 
+    DisplayName TEXT UNIQUE,
+    FileName TEXT UNIQUE,
+    URL TEXT UNIQUE,
+    CreatedAt TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+CREATE TABLE Tags (
+	Id INTEGER PRIMARY KEY AUTOINCREMENT, 
+    Name TEXT
+);
+
+CREATE TABLE ArticlesToTags (
+    ArticleId INTEGER,
+    TagId INTEGER,
+    FOREIGN KEY(ArticleId) REFERENCES Articles(Id),
+    FOREIGN KEY(TagId) REFERENCES Tags(Id)
+);
-- 
cgit v1.3

