Open source Nest implementation
-- Enable PG crypto helpers we need to store passwords
CREATE EXTENSION pgcrypto;

CREATE TABLE users (
	id              SERIAL PRIMARY KEY,
	name		VARCHAR(64) NOT NULL,
	email		TEXT NOT NULL,
	password	TEXT NOT NULL
);

CREATE UNIQUE INDEX unique_user_name ON users(name);
CREATE UNIQUE INDEX unique_user_email ON users(email);