From b5d6786ec1fe3e8b2360a270dac85e63ee1447dd Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Sun, 19 Mar 2023 11:57:53 +1300 Subject: [PATCH] A known issue added to README --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index c46e6854..c3cf62a4 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,18 @@ Gossip by default does not include the CJK font because it is larger than all ot There are so many of these (172) that it becomes a real pain to add them all. But if you need one, please ask (open an issue) and I'll add it for you. +### Known Issues + +#### Sqlite Constraint Issues (Foreign or Unique Key) + +First you need to locate your database file. The gossip directory is under this path: https://docs.rs/dirs/4.0.0/dirs/fn.data_dir.html The database file is `gossip.sqlite`. Then you need to install `sqlite3` on your system. + +Using `sqlite3` on your database file, the following kind of SQL can help you identify rows that violate foreign key constraints. + +##### Error: Sql(SqliteFailure(Error { code: ConstraintViolation, extended_code: 2067 }, Some("UNIQUE constraint failed: person_relay.person, person_relay.relay"))) + +You can find which rows are duplicated using: `select a.person, a.relay FROM person_relay a INNER JOIN person_relay b WHERE a.person=b.person AND a.relay=b.relay AND a.rowid!=b.rowid;` You'll need to delete one row from each pair (by rowid so you don't delete both of them). + ## Technology Involved - Rust Language