Once I can see the foreign key, it cannot create the link (due to syntax error), and looking at the generated SQL it isn't valid:
CREATE TABLE todos2 (
id BLOB PRIMARY KEY CHECK(is_uuid_v7(id)) DEFAULT (uuid_v7()) NOT NULL,
user BLOB DEFAULT '' FOREIGN KEY(user) REFERENCES _user(id),
name TEXT NOT NULL
) STRICT;
but it should be the following (FOREIGN KEY syntax isn't valid in SQLIte I believe) :
CREATE TABLE todos2 (
id BLOB PRIMARY KEY DEFAULT (uuid_v7()) CHECK (is_uuid_v7(id)) NOT NULL,
user BLOB DEFAULT '' REFERENCES _user(id),
name TEXT NOT NULL
) STRICT;
Similarly, creating an index (just including the id column) gives an error related to JSON and the missing field "if_not_exists".
Reported by a user on reddit (https://www.reddit.com/r/selfhosted/comments/1grf3m8/comment/lxb2m0z/?context=3):