summaryrefslogtreecommitdiff
path: root/sql.sql
blob: 3a5d8da5b4b9d5fc7fc5de6f009e3036ce86e75b (plain)
1
2
3
create table story( id int primary key auto_increment, story_id int not null unique, created_at timestamp, updated_at timestamp, type varchar(255) not null, title varchar(255) not null, text text, score int not null, descendants int not null, time int not null, poster varchar(255) not null);

create table links (id int primary key auto_increment, created_at timestamp, updated_at timestamp, story_id int not null, url varchar(255) not null, field int not null, foreign key(story_id) references story(id));