schema: Require role.email always be lowercase

Otherwise it will silently fail to match in the application.
pull/418/head
Mike Lang 1 month ago
parent 696d1c8baa
commit e00e716927

@ -131,7 +131,8 @@ CREATE TABLE nodes (
);
CREATE TABLE roles (
email TEXT PRIMARY KEY,
-- email should always be lowercase since that's how the auth function compares it
email TEXT PRIMARY KEY CHECK email = lower(email),
name TEXT NOT NULL,
editor BOOLEAN NOT NULL DEFAULT FALSE,
artist BOOLEAN NOT NULL DEFAULT FALSE

Loading…
Cancel
Save