22 lines
519 B
PL/PgSQL
22 lines
519 B
PL/PgSQL
-- Deploy numerus:user to pg
|
|
-- requires: roles
|
|
-- requires: schema_auth
|
|
-- requires: email
|
|
|
|
begin;
|
|
|
|
set search_path to auth, numerus;
|
|
|
|
create table "user" (
|
|
user_id serial primary key,
|
|
email email not null unique,
|
|
name text not null,
|
|
password text not null check (length(password) < 512),
|
|
role name not null check (length(role) < 512),
|
|
cookie text not null default '',
|
|
cookie_expires_at timestamptz not null default '-infinity'::timestamp,
|
|
created_at timestamptz not null default current_timestamp
|
|
);
|
|
|
|
commit;
|