WIP for laptop
This commit is contained in:
parent
55b583b6e6
commit
3b98eb4a95
5 changed files with 93 additions and 14 deletions
23
entryway/migrations/01_initial_schema.sql
Normal file
23
entryway/migrations/01_initial_schema.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- PDS Entryway Account Management Schema
|
||||
-- Minimal schema for account creation and authentication
|
||||
|
||||
-- Actor table - stores public identity information
|
||||
CREATE TABLE actor (
|
||||
did VARCHAR PRIMARY KEY,
|
||||
handle VARCHAR,
|
||||
created_at VARCHAR NOT NULL
|
||||
);
|
||||
|
||||
-- Case-insensitive unique index on handle
|
||||
CREATE UNIQUE INDEX actor_handle_lower_idx ON actor (LOWER(handle));
|
||||
|
||||
-- Account table - stores private authentication data
|
||||
CREATE TABLE account (
|
||||
did VARCHAR PRIMARY KEY,
|
||||
email VARCHAR NOT NULL,
|
||||
password_scrypt VARCHAR NOT NULL,
|
||||
email_confirmed_at VARCHAR
|
||||
);
|
||||
|
||||
-- Case-insensitive unique index on email
|
||||
CREATE UNIQUE INDEX account_email_lower_idx ON account (LOWER(email));
|
||||
Loading…
Add table
Add a link
Reference in a new issue