[HTC Sensation] veljko77:
Here is it:

CREATE TABLE Attendees (_id INTEGER PRIMARY KEY,event_id INTEGER,attendeeName TEXT,attendeeEmail TEXT,attendeeStatus INTEGER,
attendeeRelationship INTEGER,attendeeType INTEGER);
CREATE TABLE CalendarAlerts (_id INTEGER PRIMARY KEY,event_id INTEGER,begin INTEGER NOT NULL,end INTEGER NOT NULL,alarmTime INTEGER NOT NULL,
creationTime INTEGER NOT NULL,receivedTime INTEGER NOT NULL,notifyTime INTEGER NOT NULL,state INTEGER NOT NULL,minutes INTEGER,UNIQUE (alarmTime,
begin, event_id));
CREATE TABLE CalendarCache (_id INTEGER PRIMARY KEY,key TEXT NOT NULL,value TEXT);
CREATE TABLE CalendarMetaData (_id INTEGER PRIMARY KEY,localTimezone TEXT,minInstance INTEGER,maxInstance INTEGER);
CREATE TABLE CalendarSmsAlerts (_id INTEGER PRIMARY KEY,event_id INTEGER,begin INTEGER NOT NULL,end INTEGER NOT NULL,alarmTime INTEGER NOT
NULL,creationTime INTEGER NOT NULL,receivedTime INTEGER NOT NULL,notifyTime INTEGER NOT NULL,state INTEGER NOT NULL,minutes INTEGER,UNIQUE (
alarmTime, begin, event_id));
CREATE TABLE Calendars (_id INTEGER PRIMARY KEY,_sync_account TEXT,_sync_account_type TEXT,_sync_id TEXT,_sync_version TEXT,_sync_time TEXT,
_sync_local_id INTEGER,_sync_dirty INTEGER,_sync_mark INTEGER,url TEXT,name TEXT,displayName TEXT,displayOrder INTEGER,hidden INTEGER NOT
NULL DEFAULT 0,color INTEGER,access_level INTEGER,selected INTEGER NOT NULL DEFAULT 1,sync_events INTEGER NOT NULL DEFAULT 0,location TEXT,
timezone TEXT,ownerAccount TEXT, organizerCanRespond INTEGER NOT NULL DEFAULT 1,hide_declined INTEGER NOT NULL DEFAULT 0,reminder_type INTEGER
NOT NULL DEFAULT 1,reminder_duration INTEGER NOT NULL DEFAULT 10,alerts_vibrate INTEGER NOT NULL DEFAULT 1,alerts_ringtone TEXT,start_view
TEXT,detailed_view TEXT,sync_source INTEGER NOT NULL DEFAULT 0);
CREATE TABLE Events (_id INTEGER PRIMARY KEY AUTOINCREMENT,_sync_account TEXT,_sync_account_type TEXT,_sync_id TEXT,_sync_version TEXT,
_sync_time TEXT,_sync_local_id INTEGER,_sync_dirty INTEGER,_sync_mark INTEGER,calendar_id INTEGER NOT NULL,htmlUri TEXT,title TEXT,eventLocation
TEXT,description TEXT,eventStatus INTEGER,selfAttendeeStatus INTEGER NOT NULL DEFAULT 0,commentsUri TEXT,dtstart INTEGER,dtend INTEGER,
eventTimezone TEXT,duration TEXT,allDay INTEGER NOT NULL DEFAULT 0,visibility INTEGER NOT NULL DEFAULT 0,transparency INTEGER NOT NULL DEFAULT 0,
hasAlarm INTEGER NOT NULL DEFAULT 0,hasExtendedProperties INTEGER NOT NULL DEFAULT 0,rrule TEXT,rdate TEXT,exrule TEXT,exdate TEXT,
originalEvent TEXT,originalInstanceTime INTEGER,originalAllDay INTEGER,lastDate INTEGER,hasAttendeeData INTEGER NOT NULL DEFAULT 0,guestsCanModify
INTEGER NOT NULL DEFAULT 0,guestsCanInviteOthers INTEGER NOT NULL DEFAULT 1,guestsCanSeeGuests INTEGER NOT NULL DEFAULT 1,organizer STRING,
deleted INTEGER NOT NULL DEFAULT 0,dtstart2 INTEGER,dtend2 INTEGER,eventTimezone2 TEXT,syncAdapterData TEXT, importance INTEGER NOT NULL
DEFAULT 1,iCalGUID TEXT,last_update_time TEXT,parentID INTEGER,facebook_source_id TEXT,facebook_type TEXT,facebook_avatar_large TEXT,
facebook_avatar_small TEXT,facebook_avatar_local TEXT,MeetingStatus INTEGER NOT NULL DEFAULT 0);
CREATE TABLE EventsRawTimes (_id INTEGER PRIMARY KEY,event_id INTEGER NOT NULL,dtstart2445 TEXT,dtend2445 TEXT,originalInstanceTime2445 TEXT,
lastDate2445 TEXT,UNIQUE (event_id));
CREATE TABLE ExtendedProperties (_id INTEGER PRIMARY KEY,event_id INTEGER,name TEXT,value TEXT);
CREATE TABLE Instances (_id INTEGER PRIMARY KEY,event_id INTEGER,begin INTEGER,end INTEGER,startDay INTEGER,endDay INTEGER,startMinute
INTEGER,endMinute INTEGER,UNIQUE (event_id, begin, end));
CREATE TABLE Reminders (_id INTEGER PRIMARY KEY,event_id INTEGER,minutes INTEGER,method INTEGER NOT NULL DEFAULT 0);
CREATE TABLE _sync_state (_id INTEGER PRIMARY KEY,account_name TEXT NOT NULL,account_type TEXT NOT NULL,data TEXT,UNIQUE(account_name,
account_type));
CREATE TABLE _sync_state_metadata (version INTEGER);
CREATE TABLE android_metadata (locale TEXT);
CREATE TABLE easSyncInfo(_id INTEGER PRIMARY KEY AUTOINCREMENT,synckey STRING, CollID STRING, LastSyncResult INTEGER, LastSyncTime INTEGER,
LastSyncErrorCode INTEGER, Enabled INTEGER, accountName STRING NOT NULL);
CREATE TABLE easTracking(_id INTEGER REFERENCES Events(_id) PRIMARY KEY,serverId STRING ,_add INTEGER NOT NULL DEFAULT 0 ,_modify INTEGER
NOT NULL DEFAULT 0 ,_delete INTEGER NOT NULL DEFAULT 0 ,_syncing INTEGER NOT NULL DEFAULT 0 ,accountName STRING);
CREATE TABLE pcscSyncInfo(_id INTEGER PRIMARY KEY AUTOINCREMENT,LastSyncTime INTEGER, NextSyncTime INTEGER);
CREATE TABLE pcscTracking(_id INTEGER REFERENCES Events(_id) PRIMARY KEY,_guid STRING NOT NULL DEFAULT 'null',_add INTEGER NOT NULL DEFAULT 0 ,
_modify INTEGER NOT NULL DEFAULT 0 ,_delete INTEGER NOT NULL DEFAULT 0 ,_syncing INTEGER NOT NULL DEFAULT 0 );
CREATE VIEW view_events AS SELECT Events._id AS _id,htmlUri,title,description,eventLocation,eventStatus,selfAttendeeStatus,commentsUri,
dtstart,dtend,duration,eventTimezone,allDay,visibility,timezone,selected,access_level,transparency,color,hasAlarm,hasExtendedProperties,rrule,
rdate,exrule,exdate,originalEvent,originalInstanceTime,originalAllDay,lastDate,hasAttendeeData,calendar_id,guestsCanInviteOthers,
guestsCanModify,guestsCanSeeGuests,organizer,deleted,Events._sync_id AS _sync_id,Events._sync_version AS _sync_version,Events._sync_dirty AS _sync_dirty,
Events._sync_account AS _sync_account,Events._sync_account_type AS _sync_account_type,Events._sync_time AS _sync_time,Events._sync_local_id
AS _sync_local_id,Events._sync_mark AS _sync_mark,url,ownerAccount,sync_events,sync_source,hide_declined,reminder_type,reminder_duration,
alerts_vibrate,alerts_ringtone,parentID,importance,iCalGUID,last_update_time,facebook_source_id,facebook_type,facebook_avatar_large,
facebook_avatar_small,facebook_avatar_local,MeetingStatus FROM Events JOIN Calendars ON (Events.calendar_id=Calendars._id);
CREATE INDEX attendeesEventIdIndex ON Attendees (event_id);
CREATE INDEX calendarAlertsEventIdIndex ON CalendarAlerts (event_id);
CREATE INDEX calendarSmsAlertsEventIdIndex ON CalendarSmsAlerts (event_id);
CREATE INDEX easTrackingIndex ON easTracking(_id);
CREATE INDEX easTrackingIndex2 ON easTracking(_syncing);
CREATE INDEX easTrackingIndex3 ON easTracking(serverId);
CREATE INDEX eventSyncAccountAndIdIndex ON Events (_sync_account_type, _sync_account, _sync_id);
CREATE INDEX eventsCalendarIdIndex ON Events (calendar_id);
CREATE INDEX extendedPropertiesEventIdIndex ON ExtendedProperties (event_id);
CREATE INDEX instancesStartDayIndex ON Instances (startDay);
CREATE INDEX pcscTrackingIndex ON pcscTracking(_id);
CREATE INDEX pcscTrackingIndex2 ON pcscTracking(_syncing);
CREATE INDEX remindersEventIdIndex ON Reminders (event_id);
CREATE TRIGGER calendar_cleanup DELETE ON Calendars BEGIN DELETE FROM Events WHERE calendar_id = old._id;END;
CREATE TRIGGER easTracking_delete AFTER DELETE ON Events WHEN old._sync_account_type = 'com.htc.android.mail.eas' BEGIN UPDATE easTracking
SET _delete=1 WHERE _id=old._id;END;
CREATE TRIGGER easTracking_delete2 AFTER UPDATE OF deleted ON Events WHEN new._sync_account_type = 'com.htc.android.mail.eas' AND
new.deleted = 1 BEGIN UPDATE easTracking SET _delete=1 WHERE _id=new._id;END;
CREATE TRIGGER easTracking_update AFTER UPDATE OF _sync_dirty,title,eventLocation,description,eventStatus,selfAttendeeStatus,dtstart,dtend,
eventTimezone,duration,allDay,hasAlarm,importance,rrule,rdate,iCalGUID ON Events WHEN new._sync_account_type = 'com.htc.android.mail.eas' AND
new._sync_dirty = 1 BEGIN UPDATE easTracking SET _modify=1 WHERE _id=new._id;END;
CREATE TRIGGER events_cleanup_delete DELETE ON Events BEGIN DELETE FROM Instances WHERE event_id = old._id;DELETE FROM EventsRawTimes WHERE
event_id = old._id;DELETE FROM Attendees WHERE event_id = old._id;DELETE FROM Reminders WHERE event_id = old._id;DELETE FROM CalendarAlerts
WHERE event_id = old._id;DELETE FROM ExtendedProperties WHERE event_id = old._id;END;
CREATE TRIGGER events_insert AFTER INSERT ON Events BEGIN UPDATE Events SET _sync_account=(SELECT _sync_account FROM Calendars WHERE
Calendars._id=new.calendar_id),_sync_account_type=(SELECT _sync_account_type FROM Calendars WHERE Calendars._id=new.calendar_id) WHERE Events._id=
new._id;END;
CREATE TRIGGER pcscTracking_delete AFTER DELETE ON Events WHEN old.calendar_id = 1 BEGIN UPDATE pcscTracking SET _delete=1 WHERE _id=old._id
;END;
CREATE TRIGGER pcscTracking_update AFTER UPDATE OF _sync_dirty,title,eventLocation,description,eventStatus,selfAttendeeStatus,dtstart,dtend,
eventTimezone,duration,allDay,hasAlarm,importance,rrule,rdate,iCalGUID ON Events WHEN new.calendar_id = 1 AND new._sync_dirty = 1 BEGIN
UPDATE pcscTracking SET _modify=1 WHERE _id=new._id; UPDATE Events SET last_update_time=current_timestamp WHERE _id=new._id;END;
CREATE TRIGGER tracking_insert AFTER INSERT ON Events FOR EACH ROW BEGIN INSERT INTO eastracking(_id,_add,accountName) select new._id,1,(
SELECT _sync_account FROM Calendars WHERE Calendars._id=new.calendar_id) WHERE (SELECT _sync_account_type FROM Calendars WHERE Calendars._id =
new.calendar_id) = 'com.htc.android.mail.eas';INSERT INTO pcscTracking(_id,_add) select new._id,1 WHERE new.calendar_id = 1;END;