CREATE TABLE sqlpage_aide_navigation (
path TEXT NOT NULL, -- the "primary key" within namespace
caption TEXT NOT NULL, -- for human-friendly general-purpose name
namespace TEXT NOT NULL, -- if more than one navigation tree is required
parent_path TEXT, -- for defining hierarchy
sibling_order INTEGER, -- orders children within their parent(s)
url TEXT, -- for supplying links, if different from path
title TEXT, -- for full titles when elaboration is required, default to caption if NULL
abbreviated_caption TEXT, -- for breadcrumbs and other "short" form, default to caption if NULL
description TEXT, -- for elaboration or explanation
elaboration TEXT, -- optional attributes for e.g. { "target": "__blank" }
-- TODO: figure out why Rusqlite does not allow this but sqlite3 does
-- CONSTRAINT fk_parent_path FOREIGN KEY (namespace, parent_path) REFERENCES sqlpage_aide_navigation(namespace, path),
CONSTRAINT unq_ns_path UNIQUE (namespace, parent_path, path)
)