8 řádky
238 B
SQL
8 řádky
238 B
SQL
CREATE TABLE news (
|
|
id SERIAL NOT NULL PRIMARY KEY,
|
|
title VARCHAR(256) NOT NULL,
|
|
content TEXT NOT NULL,
|
|
author VARCHAR(32) NOT NULL REFERENCES users(username),
|
|
created TIMESTAMPTZ NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|