Skip to content

Commit

Permalink
Update script to initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoheiu committed Dec 9, 2023
1 parent 10a4a6c commit ccd3143
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down

0 comments on commit ccd3143

Please sign in to comment.