midori/data/history/Day.sql

15 lines
419 B
MySQL
Raw Normal View History

2015-09-12 00:47:06 +00:00
CREATE TEMPORARY TABLE backup
(
uri text,
title text,
date integer
);
INSERT INTO backup SELECT uri, title, date FROM history;
DROP TABLE history;
CREATE TABLE history (uri text, title text, date integer, day integer);
INSERT INTO history SELECT uri, title, date,
julianday(date(date,'unixepoch','start of day','+1 day'))
- julianday('0001-01-01','start of day')
FROM backup;
DROP TABLE backup;