~midori/midori/trunk

« back to all changes in this revision

Viewing changes to data/history/Day.sql

  • Committer: Christian Dywan
  • Date: 2013-09-17 21:30:59 UTC
  • mto: This revision was merged to the branch mainline in revision 6405.
  • Revision ID: christian.dywan@canonical.com-20130917213059-w794s2tmeib68etq
Refactor excuting schema from file into a function

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
CREATE TEMPORARY TABLE backup
 
2
(
 
3
    uri text,
 
4
    title text,
 
5
    date integer
 
6
);
 
7
INSERT INTO backup SELECT uri, title, date FROM history;
 
8
DROP TABLE history;
 
9
CREATE TABLE history (uri text, title text, date integer, day integer);
 
10
INSERT INTO history SELECT uri, title, date,
 
11
    julianday(date(date,'unixepoch','start of day','+1 day'))
 
12
    - julianday('0001-01-01','start of day')
 
13
    FROM backup;
 
14
DROP TABLE backup;