From 78fe4481099fcf6666f1a259e38d9d828a253347 Mon Sep 17 00:00:00 2001
From: SayaAndy <saya.andy@posteo.com>
Date: Sat, 30 Aug 2025 00:36:46 +0700
Subject: feat: add persistent storage for likes

---
 migrations/1_create_stats_tables.up.sql | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 migrations/1_create_stats_tables.up.sql

(limited to 'migrations/1_create_stats_tables.up.sql')

diff --git a/migrations/1_create_stats_tables.up.sql b/migrations/1_create_stats_tables.up.sql
new file mode 100644
index 0000000..8852268
--- /dev/null
+++ b/migrations/1_create_stats_tables.up.sql
@@ -0,0 +1,11 @@
+CREATE TABLE IF NOT EXISTS blog_likes (
+    page_ref VARCHAR(32) NOT NULL,
+    user_id VARCHAR(32) NOT NULL,
+    PRIMARY KEY (page_ref, user_id)
+) WITHOUT ROWID;
+
+CREATE TABLE IF NOT EXISTS blog_views (
+    page_ref VARCHAR(32) NOT NULL,
+    user_id VARCHAR(32) NOT NULL,
+    PRIMARY KEY (page_ref, user_id)
+) WITHOUT ROWID;
-- 
cgit v1.3.1+13

