1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/test
Anthony Bilinski 16ac8a8eac
refactor(History): Split peers table into chats and authors
peers had combined meaning, both being referenced by history for which
chat a message was in, and being reference by aliases for who authored a
message. This means that peers had conceptually different sub-groups:
all friends are both a chat and an author, but self is an author but not
a chat. With the addition of group chats this is amplified by groups
themselves being chats but not authors, and group members being authors
but not chats. Instead of having four sub-groups all within peers,
splitting peers into chats and authors gives a clean mapping,
simplifying interactions with the data.

In the new chats and authors tables, store what used to be a public_key
string as a BLOB, since it’s inherently a 32-byte binary value in both
cases. Call the public_key a UUID for chats, since group IDs are not
defined as public keys by toxcore.

Even though the data change is quite minor, the upgrade is large because
of SQLite's lack of support for modifying foreign key constrains for
existing tables. This means when peers are moved to new tables, all
tables referencing peers need to be cloned with a new foreign key
constraint, as well as all tables referencing those, recursively.
2022-03-29 21:27:01 -07:00
..
chatlog refactor: Comply with Wpedantic 2022-03-11 10:08:02 -08:00
core refactor(model): Rename Contact and ContactId to Chat and ChatId 2022-03-14 12:44:37 -07:00
dbutility refactor(History): Split peers table into chats and authors 2022-03-29 21:27:01 -07:00
mock chore(build): Enable all warnings on qTox libraries as well 2022-03-24 04:19:41 -07:00
model refactor(style): Match declaration and definition argument names 2022-03-15 08:19:53 -07:00
net refactor(Paths): Remove Paths factory to enable copy construction 2022-02-16 20:15:46 -08:00
persistence refactor(History): Split peers table into chats and authors 2022-03-29 21:27:01 -07:00
platform refactor(style): Match declaration and definition argument names 2022-03-15 08:19:53 -07:00
widget refactor: Comply with Wunused-parameter 2022-03-11 10:07:57 -08:00