xenu_nntp/db/newsgroup.sql

23 lines
597 B
MySQL
Raw Normal View History

2024-11-08 15:47:21 -05:00
begin transaction;
2024-11-08 20:31:00 -05:00
create table newsgroup (
id INTEGER PRIMARY KEY NOT NULL,
created_on DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
2024-11-08 20:31:00 -05:00
name TEXT NOT NULL,
description TEXT NOT NULL
);
2024-11-08 15:47:21 -05:00
create table newsgroup_message (
2024-11-08 20:31:00 -05:00
id INTEGER PRIMARY KEY NOT NULL,
newsgroup_id INTEGER NOT NULL,
message_id TEXT NOT NULL UNIQUE,
2024-11-08 20:31:00 -05:00
created_on DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
sender TEXT NOT NULL,
subject TEXT NOT NULL,
content TEXT NOT NULL,
FOREIGN KEY(newsgroup_id) REFERENCES newsgroup(id)
2024-11-08 15:47:21 -05:00
);
commit;