Skip to content

Instantly share code, notes, and snippets.

View tjunussov's full-sized avatar

Tim TJey Jun tjunussov

View GitHub Profile
@tjunussov
tjunussov / schema.sql
Created March 2, 2021 12:05 — forked from hays-hutton/schema.sql
A Simplified Schema Example for PostgREST
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE IF NOT EXISTS
users (
email TEXT PRIMARY KEY CHECK ( email ~* '^.+@.+\..+$' ),
pass TEXT NOT NULL CHECK (length(pass) < 256),
role NAME NOT NULL CHECK (length(role) < 256)
);
CREATE TABLE IF NOT EXISTS