From ccd3143606832bafaac6444ebd884ebd7babe730 Mon Sep 17 00:00:00 2001 From: Kyohei Uto Date: Sat, 9 Dec 2023 16:34:00 +0900 Subject: [PATCH] Update script to initialize --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37d8b66..3d26a9f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,26 @@ Note that this demo site will be reset every hour. ```sh # pwd: /path/to/databases -cat create_table.sql | sqlite3 .sqlite +echo " +CREATE TABLE IF NOT EXISTS articles ( + id TEXT PRIMARY KEY, + url TEXT, + title TEXT, + html TEXT, + cover TEXT, + beginning TEXT, + position INTEGER, + progress INTEGER, + archived INTEGER NOT NULL DEFAULT 0 CHECK (archived IN (0, 1)), + liked INTEGER NOT NULL DEFAULT 0 CHECK (liked IN (0, 1)), + timestamp DATETIME +); +CREATE TABLE IF NOT EXISTS tags ( + id INTEGER PRIMARY KEY, + ulid TEXT, + tag TEXT NOT NULL +); +" | sqlite3 .sqlite mkdir .index ```