3
|
1 -- SQLite database updates since version 0.9-beta
|
|
2
|
|
3 -- ALTER TABLE events ADD url varchar(255) NOT NULL AFTER categories;
|
|
4
|
|
5 CREATE TABLE temp_events (
|
|
6 event_id integer NOT NULL PRIMARY KEY,
|
|
7 calendar_id integer NOT NULL default '0',
|
|
8 recurrence_id integer NOT NULL default '0',
|
|
9 uid varchar(255) NOT NULL default '',
|
|
10 created datetime NOT NULL default '1000-01-01 00:00:00',
|
|
11 changed datetime NOT NULL default '1000-01-01 00:00:00',
|
|
12 sequence integer NOT NULL default '0',
|
|
13 start datetime NOT NULL default '1000-01-01 00:00:00',
|
|
14 end datetime NOT NULL default '1000-01-01 00:00:00',
|
|
15 recurrence varchar(255) default NULL,
|
|
16 title varchar(255) NOT NULL,
|
|
17 description text NOT NULL,
|
|
18 location varchar(255) NOT NULL default '',
|
|
19 categories varchar(255) NOT NULL default '',
|
|
20 url varchar(255) NOT NULL default '',
|
|
21 all_day tinyint(1) NOT NULL default '0',
|
|
22 free_busy tinyint(1) NOT NULL default '0',
|
|
23 priority tinyint(1) NOT NULL default '0',
|
|
24 sensitivity tinyint(1) NOT NULL default '0',
|
|
25 alarms varchar(255) default NULL,
|
|
26 attendees text default NULL,
|
|
27 notifyat datetime default NULL
|
|
28 );
|
|
29
|
|
30 INSERT INTO temp_events (event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, url, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat)
|
|
31 SELECT event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, url, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat
|
|
32 FROM events;
|
|
33
|
|
34 DROP TABLE events;
|
|
35
|
|
36 CREATE TABLE events (
|
|
37 event_id integer NOT NULL PRIMARY KEY,
|
|
38 calendar_id integer NOT NULL default '0',
|
|
39 recurrence_id integer NOT NULL default '0',
|
|
40 uid varchar(255) NOT NULL default '',
|
|
41 created datetime NOT NULL default '1000-01-01 00:00:00',
|
|
42 changed datetime NOT NULL default '1000-01-01 00:00:00',
|
|
43 sequence integer NOT NULL default '0',
|
|
44 start datetime NOT NULL default '1000-01-01 00:00:00',
|
|
45 end datetime NOT NULL default '1000-01-01 00:00:00',
|
|
46 recurrence varchar(255) default NULL,
|
|
47 title varchar(255) NOT NULL,
|
|
48 description text NOT NULL,
|
|
49 location varchar(255) NOT NULL default '',
|
|
50 categories varchar(255) NOT NULL default '',
|
|
51 url varchar(255) NOT NULL default '',
|
|
52 all_day tinyint(1) NOT NULL default '0',
|
|
53 free_busy tinyint(1) NOT NULL default '0',
|
|
54 priority tinyint(1) NOT NULL default '0',
|
|
55 sensitivity tinyint(1) NOT NULL default '0',
|
|
56 status varchar(32) NOT NULL default '',
|
|
57 alarms varchar(255) default NULL,
|
|
58 attendees text default NULL,
|
|
59 notifyat datetime default NULL,
|
|
60 CONSTRAINT fk_events_calendar_id FOREIGN KEY (calendar_id)
|
|
61 REFERENCES calendars(calendar_id)
|
|
62 );
|
|
63
|
|
64 INSERT INTO events (event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, url, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat)
|
|
65 SELECT event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, url, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat
|
|
66 FROM temp_events;
|
|
67
|