CREATE DATABASE clog;

\connect clog

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

CREATE TABLE posts (
	id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
	-- draft BOOLEAN NOT NULL DEFAULT TRUE,
	title CHARACTER VARYING NOT NULL,
	body CHARACTER VARYING NOT NULL,
	created_at TIMESTAMP NOT NULL DEFAULT NOW(),
	updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
