schema: separate name deduplication from display name

This commit is contained in:
Branden J Brown 2025-05-03 19:06:08 -04:00
parent 91269b5f1c
commit aa5a043198

View File

@ -10,8 +10,11 @@ CREATE TABLE user (
-- UUIDv7 in binary format. -- UUIDv7 in binary format.
"id" BLOB PRIMARY KEY NOT NULL, "id" BLOB PRIMARY KEY NOT NULL,
-- Display name. -- Display name.
-- TODO(zephyr): Is just COLLATE NOCASE UNIQUE sufficient? "name" TEXT NOT NULL,
"name" TEXT COLLATE NOCASE UNIQUE NOT NULL, -- Canonical name for deduplication.
-- It is used only for uniqueness, never displayed to users.
-- Canonicalization is handled in the application layer.
"canonical_name" TEXT UNIQUE NOT NULL,
-- URL of the user's profile picture, if any. -- URL of the user's profile picture, if any.
"picture" TEXT, "picture" TEXT,
-- Timestamp at which this user was soft-deleted, if ever. -- Timestamp at which this user was soft-deleted, if ever.