Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: f1403d01621fe457e71044e4804e886a32a7e4ee
Timestamp: Tue, 31 May 2022 13:37:19 +0000 (2 years ago)

+3 -0 +/-1 browse
update schema
1diff --git a/pkg/hierarchy/migrate/init.sql b/pkg/hierarchy/migrate/init.sql
2index 8fc56ae..176943d 100644
3--- a/pkg/hierarchy/migrate/init.sql
4+++ b/pkg/hierarchy/migrate/init.sql
5 @@ -1,13 +1,16 @@
6 PRAGMA foreign_keys = on;
7
8+ -- main note table
9 CREATE TABLE IF NOT EXISTS notes (
10 id INTEGER PRIMARY KEY,
11+ created_at INTEGER,
12 parent INTEGER,
13 name VARCHAR NOT NULL UNIQUE,
14 content VARCHAR,
15 FOREIGN KEY(parent) REFERENCES notes(id)
16 );
17
18+ -- references to and from each note
19 CREATE TABLE IF NOT EXISTS links (
20 id INTEGER PRIMARY KEY,
21 source INTEGER,