From 8805e91d09a39447734f8a84af1aabf47074dc55 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 25 Oct 2006 23:59:40 +0000 Subject: [PATCH] Monotone-Parent: 19e618a35e17deb331a98af60ddcc5529db862be Monotone-Revision: a560de6c68352dec0b884b1c980ee3e94d963add Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-25T23:59:40 Monotone-Branch: ca.inverse.sogo --- OGoContentStore/OCSiCalFieldExtractor.m | 30 +++++++++---------- OGoContentStore/appointment.ocs | 2 +- OGoContentStore/sql/appointment-create.psql | 2 +- .../sql/generate-folderinfo-sql-for-users.sh | 3 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/OGoContentStore/OCSiCalFieldExtractor.m b/OGoContentStore/OCSiCalFieldExtractor.m index 2e515cada..b51e348b4 100644 --- a/OGoContentStore/OCSiCalFieldExtractor.m +++ b/OGoContentStore/OCSiCalFieldExtractor.m @@ -104,19 +104,19 @@ static NSNumber *distantFutureNumber = nil; else [self logWithFormat:@"WARNING: could not extract a uid from event!"]; - [row setObject:[NSNumber numberWithBool:[_event isAllDay]] - forKey:@"isallday"]; - [row setObject:[NSNumber numberWithBool:[_event isRecurrent]] - forKey:@"iscycle"]; - [row setObject:[NSNumber numberWithBool:[_event isOpaque]] - forKey:@"isopaque"]; - [row setObject:[NSNumber numberWithInt:[_event priorityNumber]] - forKey:@"priority"]; + [row setObject:[NSNumber numberWithBool: [_event isAllDay]] + forKey: @"isallday"]; + [row setObject:[NSNumber numberWithBool: [_event isRecurrent]] + forKey: @"iscycle"]; + [row setObject:[NSNumber numberWithBool: [_event isOpaque]] + forKey: @"isopaque"]; + [row setObject:[NSNumber numberWithInt: [_event priorityNumber]] + forKey: @"priority"]; + + if ([title isNotNull]) [row setObject: title forKey:@"title"]; + if ([location isNotNull]) [row setObject: location forKey:@"location"]; + if ([sequence isNotNull]) [row setObject: sequence forKey:@"sequence"]; - if ([title isNotNull]) [row setObject:title forKey:@"title"]; - if ([location isNotNull]) [row setObject:location forKey:@"location"]; - if ([sequence isNotNull]) [row setObject:sequence forKey:@"sequence"]; - if ([startDate isNotNull]) [row setObject: [self numberForDate: startDate] forKey:@"startdate"]; if ([endDate isNotNull]) @@ -135,14 +135,14 @@ static NSNumber *distantFutureNumber = nil; } if ([participants length] > 0) - [row setObject:participants forKey:@"participants"]; + [row setObject: participants forKey:@"participants"]; if ([partmails length] > 0) - [row setObject:partmails forKey:@"partmails"]; + [row setObject: partmails forKey:@"partmails"]; if ([status isNotNull]) { int code = 1; - if ([status isEqualToString:@"TENTATIVE"]) + if ([status isEqualToString:@"TENTATIVE"] code = 0; else if ([status isEqualToString:@"CANCELLED"]) code = 2; diff --git a/OGoContentStore/appointment.ocs b/OGoContentStore/appointment.ocs index bab9fb749..b1d267e29 100644 --- a/OGoContentStore/appointment.ocs +++ b/OGoContentStore/appointment.ocs @@ -57,7 +57,7 @@ { columnName = isopaque; sqlType = "INT"; - allowsNull = YES; + allowsNull = NO; }, { columnName = status; diff --git a/OGoContentStore/sql/appointment-create.psql b/OGoContentStore/sql/appointment-create.psql index 45bb70c33..94c370c61 100644 --- a/OGoContentStore/sql/appointment-create.psql +++ b/OGoContentStore/sql/appointment-create.psql @@ -13,7 +13,7 @@ CREATE TABLE %s_quick ( iscycle INT NULL, -- client needs to fetch to resolve ispublic INT NOT NULL, status INT NOT NULL, - isopaque INT NULL, + isopaque INT NOT NULL, location VARCHAR(256) NULL, orgmail VARCHAR(256) NULL, partmails VARCHAR(100000) NOT NULL, -- the emails of the participants diff --git a/OGoContentStore/sql/generate-folderinfo-sql-for-users.sh b/OGoContentStore/sql/generate-folderinfo-sql-for-users.sh index 0a08fdac7..e2cefb3d3 100755 --- a/OGoContentStore/sql/generate-folderinfo-sql-for-users.sh +++ b/OGoContentStore/sql/generate-folderinfo-sql-for-users.sh @@ -81,12 +81,13 @@ CREATE TABLE SOGo_${USER_TABLE}_privcal_quick ( ispublic INT NOT NULL, status INT NOT NULL, priority INT NOT NULL, -- for marking high prio apts - isopaque INT NULL, + isopaque INT NOT NULL, location VARCHAR(256) NULL, orgmail VARCHAR(256) NULL, partmails VARCHAR(100000) NOT NULL, -- the emails of the participants partstates VARCHAR(256) NOT NULL, -- the status of each participant sequence INT NULL -- the iCal sequence + component VARCHAR(10) NOT NULL, -- the type of component (vevent/vtodo) in the vcalendar ); CREATE TABLE SOGo_${USER_TABLE}_privcal (