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 all_day tinyint(1) NOT NULL default '0',
|
|
21 free_busy tinyint(1) NOT NULL default '0',
|
|
22 priority tinyint(1) NOT NULL default '0',
|
|
23 sensitivity tinyint(1) NOT NULL default '0',
|
|
24 alarms varchar(255) default NULL,
|
|
25 attendees text default NULL,
|
|
26 notifyat datetime default NULL
|
|
27 );
|
|
28
|
|
29 INSERT INTO temp_events (event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat)
|
|
30 SELECT event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat FROM events;
|
|
31
|
|
32 DROP TABLE events;
|
|
33
|
|
34 CREATE TABLE events (
|
|
35 event_id integer NOT NULL PRIMARY KEY,
|
|
36 calendar_id integer NOT NULL default '0',
|
|
37 recurrence_id integer NOT NULL default '0',
|
|
38 uid varchar(255) NOT NULL default '',
|
|
39 created datetime NOT NULL default '1000-01-01 00:00:00',
|
|
40 changed datetime NOT NULL default '1000-01-01 00:00:00',
|
|
41 sequence integer NOT NULL default '0',
|
|
42 start datetime NOT NULL default '1000-01-01 00:00:00',
|
|
43 end datetime NOT NULL default '1000-01-01 00:00:00',
|
|
44 recurrence varchar(255) default NULL,
|
|
45 title varchar(255) NOT NULL,
|
|
46 description text NOT NULL,
|
|
47 location varchar(255) NOT NULL default '',
|
|
48 categories varchar(255) NOT NULL default '',
|
|
49 url varchar(255) NOT NULL default '',
|
|
50 all_day tinyint(1) NOT NULL default '0',
|
|
51 free_busy tinyint(1) NOT NULL default '0',
|
|
52 priority tinyint(1) NOT NULL default '0',
|
|
53 sensitivity tinyint(1) NOT NULL default '0',
|
|
54 alarms varchar(255) default NULL,
|
|
55 attendees text default NULL,
|
|
56 notifyat datetime default NULL,
|
|
57 CONSTRAINT fk_events_calendar_id FOREIGN KEY (calendar_id)
|
|
58 REFERENCES calendars(calendar_id)
|
|
59 );
|
|
60
|
|
61 INSERT INTO events (event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat)
|
|
62 SELECT event_id, calendar_id, recurrence_id, uid, created, changed, sequence, start, end, recurrence, title, description, location, categories, all_day, free_busy, priority, sensitivity, alarms, attendees, notifyat FROM temp_events;
|
|
63
|