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.
"id" BLOB PRIMARY KEY NOT NULL,
-- Display name.
-- TODO(zephyr): Is just COLLATE NOCASE UNIQUE sufficient?
"name" TEXT COLLATE NOCASE UNIQUE NOT NULL,
"name" TEXT 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.
"picture" TEXT,
-- Timestamp at which this user was soft-deleted, if ever.