Monotone-Parent: cabe90d6f97f59078bc2811dccc1b93963503963

Monotone-Revision: 814e2c26d81893d5ea03ae14fc5a03d63cb2431a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-08-13T21:27:20
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-08-13 21:27:20 +00:00
parent b33f0ff289
commit 7bfea6c8a1
4 changed files with 51 additions and 5 deletions

View File

@ -151,15 +151,18 @@ static BOOL debugObjectAllocation = NO;
tableURL: (NSString *) url tableURL: (NSString *) url
andType: (NSString *) tableType andType: (NSString *) tableType
{ {
NSString *tableName, *descFile; NSString *tableName, *descFile, *tableFile, *fileSuffix;
EOAdaptorChannel *tc; EOAdaptorChannel *tc;
NGBundleManager *bm; NGBundleManager *bm;
NSBundle *bundle; NSBundle *bundle;
unsigned int length; unsigned int length;
NSURL *channelURL;
bm = [NGBundleManager defaultBundleManager]; bm = [NGBundleManager defaultBundleManager];
tc = [cm acquireOpenChannelForURL: [NSURL URLWithString: url]]; channelURL = [NSURL URLWithString: url];
fileSuffix = [channelURL scheme];
tc = [cm acquireOpenChannelForURL: channelURL];
tableName = [url lastPathComponent]; tableName = [url lastPathComponent];
if ([tc evaluateExpressionX: if ([tc evaluateExpressionX:
@ -167,8 +170,13 @@ static BOOL debugObjectAllocation = NO;
{ {
bundle = [bm bundleWithName: @"MainUI" type: @"SOGo"]; bundle = [bm bundleWithName: @"MainUI" type: @"SOGo"];
length = [tableType length] - 3; length = [tableType length] - 3;
descFile = [bundle pathForResource: [tableType substringToIndex: length] tableFile = [tableType substringToIndex: length];
descFile
= [bundle pathForResource: [NSString stringWithFormat: @"%@-%@",
tableFile, fileSuffix]
ofType: @"sql"]; ofType: @"sql"];
if (!descFile)
descFile = [bundle pathForResource: tableFile ofType: @"sql"];
if (![tc evaluateExpressionX: if (![tc evaluateExpressionX:
[NSString stringWithContentsOfFile: descFile]]) [NSString stringWithContentsOfFile: descFile]])
[self logWithFormat: @"table '%@' successfully created!", tableName]; [self logWithFormat: @"table '%@' successfully created!", tableName];

View File

@ -0,0 +1,9 @@
--
-- (C) 2007 Inverse groupe conseil
--
CREATE TABLE SOGo_user_profile (
c_uid VARCHAR(255) NOT NULL PRIMARY KEY,
c_defaults CLOB,
c_settings CLOB
);

View File

@ -18,8 +18,10 @@ MainUI_OBJC_FILES += \
MainUI_RESOURCE_FILES += \ MainUI_RESOURCE_FILES += \
Version \ Version \
product.plist \ product.plist \
AgenorProfile.sql \
AgenorProfile-oracle.sql \
OCSFolderInfo.sql \ OCSFolderInfo.sql \
AgenorProfile.sql OCSFolderInfo-oracle.sql \
MainUI_LOCALIZED_RESOURCE_FILES += \ MainUI_LOCALIZED_RESOURCE_FILES += \
Locale Localizable.strings Locale Localizable.strings

View File

@ -0,0 +1,27 @@
--
-- (C) 2007 Inverse groupe conseil
--
CREATE TABLE SOGo_folder_info (
c_folder_id INTEGER PRIMARY KEY,
c_path VARCHAR(255) NOT NULL, -- the full path to the folder
c_path1 VARCHAR(255) NOT NULL, -- parts (for fast queries)
c_path2 VARCHAR(255) NULL, -- parts (for fast queries)
c_path3 VARCHAR(255) NULL, -- parts (for fast queries)
c_path4 VARCHAR(255) NULL, -- parts (for fast queries)
c_foldername VARCHAR(255) NOT NULL, -- last path component
c_location VARCHAR(2048) NOT NULL, -- URL to folder
c_quick_location VARCHAR(2048) NULL, -- URL to quicktable of folder
c_acl_location VARCHAR(2048) NULL, -- URL to quicktable of folder
c_folder_type VARCHAR(255) NOT NULL -- the folder type ...
);
CREATE SEQUENCE SOGo_folder_info_seq;
CREATE OR REPLACE TRIGGER SOGo_folder_info_autonumber
BEFORE INSERT ON SOGo_folder_info FOR EACH ROW
BEGIN
IF :new.c_folder_id IS NULL THEN
SELECT SOGO_folder_info_seq.nextval INTO :new.c_folder_id FROM DUAL;
END IF;
END;
/