codigocomentado/migrations/2019-11-13-074151_create_posts/up.sql

9 lines
234 B
SQL

CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title VARCHAR NOT NULL,
content TEXT NOT NULL,
published BOOLEAN NOT NULL DEFAULT 'f',
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
)