9 lines
186 B
SQL
9 lines
186 B
SQL
CREATE TABLE posts (
|
|
id SERIAL PRIMARY KEY,
|
|
title VARCHAR NOT NULL,
|
|
content TEXT NOT NULL,
|
|
author_id INTEGER NOT NULL
|
|
);
|
|
|
|
CREATE INDEX idx_author_id ON posts(author_id);
|