-- Deploy camper:user to pg
-- requires: roles
-- requires: schema_auth
-- requires: email
-- requires: language

begin;

set search_path to auth, camper, public;

create table "user" (
	user_id integer generated by default as identity primary key,
	email email not null unique,
	name text not null,
	password text not null check (length(password) < 512),
	lang_tag text not null default 'und' references language,
	cookie text not null default '',
	cookie_expires_at timestamptz not null default '-infinity'::timestamp,
	created_at timestamptz not null default current_timestamp
);

commit;
