Commit
+3 -0 +/-1 browse
1 | diff --git a/pkg/hierarchy/migrate/init.sql b/pkg/hierarchy/migrate/init.sql |
2 | index 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, |