summaryrefslogtreecommitdiff
path: root/sql.sql
diff options
context:
space:
mode:
authoradmin2024-09-23 15:33:44 +0200
committeradmin2024-09-23 15:33:44 +0200
commit0b8d19eeae79030458b3e1492dd6b0c5a5bf2d75 (patch)
treebaa63f7d8c862c696affe5913553493c1f3e61c1 /sql.sql
parentb190512e951efdd1ed4642eed8726bf7bdf2c022 (diff)
downloadhncrawler-0b8d19eeae79030458b3e1492dd6b0c5a5bf2d75.tar.gz
saves last seen max_story_id and stops walk down there
Diffstat (limited to 'sql.sql')
-rw-r--r--sql.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql.sql b/sql.sql
index 3a5d8da..c409e23 100644
--- a/sql.sql
+++ b/sql.sql
@@ -1,3 +1,5 @@
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));
+
+create table max_item(id int primary key auto_increment, max_story_id int not null unique, created_at timestamp, updated_at timestamp, foreign key(max_story_id) references story(story_id));