diff --git a/database.go b/database.go index 019e395..0a6c604 100644 --- a/database.go +++ b/database.go @@ -158,7 +158,6 @@ func (ndb newsDatabase) initUpvotesDB() error { from votes ) select * from exits where direction != 0 `, - `delete from votes where userID < 100`, } for _, s := range seedStatements { diff --git a/sql/delete-old-data.sql b/sql/delete-old-data.sql index 4cfc593..ce5f57b 100644 --- a/sql/delete-old-data.sql +++ b/sql/delete-old-data.sql @@ -1,4 +1,4 @@ -- delete data older than one month. It's taking about 18 days to fill a gig, and we have -- 3 gig volume currently. That gives us 54 days. But 30 days is plenty and this gives us margin -- in case the rate of growth of data increases. -delete from dataset left join votes on (id = storyID) where storyID is null and sampletime <= unixepoch()-30*24*60*60 +delete from dataset where sampletime <= unixepoch()-30*24*60*60