--
BEGIN;
--
CREATE TABLE article (
	id       SERIAL    NOT NULL UNIQUE PRIMARY KEY,
	posttime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	name     TEXT      NOT NULL,
	title    TEXT      NOT NULL,
	message  TEXT      NOT NULL,
	ip       INET      NOT NULL,
	proxy    INET
);

CREATE TABLE repsonse (
	id SERIAL NOT NULL UNIQUE PRIMARY KEY,
	article  INTEGER   NOT NULL REFERENCES article(id),
	posttime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	name     TEXT      NOT NULL,
	message  TEXT      NOT NULL
);

COMMIT;
