From aed07d8fb47d19123ee958b52bfa5b4295f35225 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 8 Feb 2007 19:00:01 +0000 Subject: [PATCH] Monotone-Parent: 712040e55618bec7c04be7fc95173aadc966c25b Monotone-Revision: c443c4725dc53c9efb233042a3e2a3a33ff9b294 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-08T19:00:01 Monotone-Branch: ca.inverse.sogo --- OGoContentStore/sql/folderinfo-create.sqlite | 62 ---------- .../foldertablecreate-helge-privcal.sqlite | 36 ------ ...enerate-folderinfo-sql-for-users-sqlite.sh | 114 ------------------ ...e-folderinfo-sql-for-users-sqlite1table.sh | 109 ----------------- 4 files changed, 321 deletions(-) delete mode 100644 OGoContentStore/sql/folderinfo-create.sqlite delete mode 100644 OGoContentStore/sql/foldertablecreate-helge-privcal.sqlite delete mode 100755 OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite.sh delete mode 100755 OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite1table.sh diff --git a/OGoContentStore/sql/folderinfo-create.sqlite b/OGoContentStore/sql/folderinfo-create.sqlite deleted file mode 100644 index cb5e58548..000000000 --- a/OGoContentStore/sql/folderinfo-create.sqlite +++ /dev/null @@ -1,62 +0,0 @@ --- --- (C) 2005 SKYRIX Software AG --- --- TODO: --- add a unique constraints on path - --- DROP TABLE SOGo_folder_info; - -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_folder_type VARCHAR(255) NOT NULL /* the folder type ... */ -); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users', - 'Users', - NULL, - NULL, - NULL, - 'Users', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_user_folder_blob', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_user_folder_quick', - 'Container' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/helge', - 'Users', - 'helge', - NULL, - NULL, - 'helge', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_user_folder_blob', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_user_folder_quick', - 'Container' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/helge/Calendar', - 'Users', - 'helge', - 'Calendar', - NULL, - 'Calendar', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_helge_privcal_blob', - 'sqlite://localhost/tmp/sogo-registry.sqlite/SOGo_helge_privcal_quick', - 'Appointment' ); diff --git a/OGoContentStore/sql/foldertablecreate-helge-privcal.sqlite b/OGoContentStore/sql/foldertablecreate-helge-privcal.sqlite deleted file mode 100644 index 4b324bbe6..000000000 --- a/OGoContentStore/sql/foldertablecreate-helge-privcal.sqlite +++ /dev/null @@ -1,36 +0,0 @@ -/* - (C) 2005 SKYRIX Software AG -*/ - -DROP TABLE SOGo_helge_privcal_quick; -DROP TABLE SOGo_helge_privcal; - -CREATE TABLE SOGo_helge_privcal_quick ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - uid VARCHAR(256) NOT NULL, - startdate INT NOT NULL, - enddate INT NOT NULL, - cycleenddate INT NULL, /* enddate for cyclic events */ - title VARCHAR(1000) NOT NULL, - cycleinfo VARCHAR(1000) NULL, /* property list with cycle infos */ - participants VARCHAR(100000) NOT NULL, /* the CNs of the participants */ - isallday INT NULL, - iscycle INT NULL, /* client needs to fetch to resolve */ - ispublic INT NOT NULL, - status INT NOT NULL, - isopaque INT NULL, - priority INT NOT NULL, -- for marking high prio apts - 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 */ -); - -CREATE TABLE SOGo_helge_privcal_blob ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - c_content VARCHAR(100000) NOT NULL, /* the BLOB */ - c_creationdate INT NOT NULL, /* creation date */ - c_lastmodified INT NOT NULL, /* last modification (UPDATE) */ - c_version INT NOT NULL /* version counter */ -); diff --git a/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite.sh b/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite.sh deleted file mode 100755 index 19b702c38..000000000 --- a/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash -# -# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...] -# - -DB="/tmp/sogo-registry.sqlite" - -while [ "$1" != "" ]; do -USER_ID=$1 -USER_TABLE=`echo $USER_ID | tr -s [:punct:] _` -cat << EOF -DELETE FROM SOGo_folder_info WHERE c_path2 = '${USER_ID}'; - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}', - 'Users', - '${USER_ID}', - NULL, - NULL, - '${USER_ID}', - 'sqlite://localhost${DB}/SOGo_user_folder_blob', - 'sqlite://localhost${DB}/SOGo_user_folder_quick', - 'Container' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}/Calendar', - 'Users', - '${USER_ID}', - 'Calendar', - NULL, - 'Calendar', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_privcal_blob', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_privcal_quick', - 'Appointment' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}/Contacts', - 'Users', - '${USER_ID}', - 'Contacts', - NULL, - 'Contacts', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_contacts_blob', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_contacts_quick', - 'Contact' ); - -DROP TABLE SOGo_${USER_TABLE}_privcal_quick; -DROP TABLE SOGo_${USER_TABLE}_privcal_blob; - -CREATE TABLE SOGo_${USER_TABLE}_privcal_quick ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - uid VARCHAR(256) NOT NULL, - startdate INT NOT NULL, - enddate INT NOT NULL, - cycleenddate INT NULL, /* enddate for cyclic events */ - title VARCHAR(1000) NOT NULL, - cycleinfo VARCHAR(1000) NULL, /* property list with cycle infos */ - participants VARCHAR(100000) NOT NULL, /* the CNs of the participants */ - isallday INT NULL, - iscycle INT NULL, /* client needs to fetch to resolve */ - ispublic INT NOT NULL, - status INT NOT NULL, - isopaque INT NULL, - priority INT NOT NULL, -- for marking high prio apts - 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 */ -); - -CREATE TABLE SOGo_${USER_TABLE}_privcal_blob ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - c_content VARCHAR(100000) NOT NULL, /* the BLOB */ - c_creationdate INT NOT NULL, /* creation date */ - c_lastmodified INT NOT NULL, /* last modification (UPDATE) */ - c_version INT NOT NULL /* version counter */ -); - -DROP TABLE SOGo_${USER_TABLE}_contacts_quick; -DROP TABLE SOGo_${USER_TABLE}_contacts_blob; - -CREATE TABLE SOGo_${USER_TABLE}_contacts_quick ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - givenname VARCHAR(256), - cn VARCHAR(256), - sn VARCHAR(256), - l VARCHAR(256), - mail VARCHAR(256), - o VARCHAR(256), - ou VARCHAR(256), - telephonenumber VARCHAR(256) -); - -CREATE TABLE SOGo_${USER_TABLE}_contacts_blob ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - c_content VARCHAR(100000) NOT NULL, /* the BLOB */ - c_creationdate INT NOT NULL, /* creation date */ - c_lastmodified INT NOT NULL, /* last modification (UPDATE) */ - c_version INT NOT NULL /* version counter */ -); - -EOF -shift -done diff --git a/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite1table.sh b/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite1table.sh deleted file mode 100755 index 3b1a7a96a..000000000 --- a/OGoContentStore/sql/generate-folderinfo-sql-for-users-sqlite1table.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# -# Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...] -# - -DB="/tmp/sogo-registry.sqlite" - -while [ "$1" != "" ]; do -USER_ID=$1 -USER_TABLE=`echo $USER_ID | tr -s [:punct:] _` - -cat << EOF -DELETE FROM SOGo_folder_info WHERE c_path2 = '${USER_ID}'; - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}', - 'Users', - '${USER_ID}', - NULL, - NULL, - '${USER_ID}', - 'sqlite://localhost${DB}/SOGo_user_folder_blob', - 'sqlite://localhost${DB}/SOGo_user_folder_quick', - 'Container' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}/Calendar', - 'Users', - '${USER_ID}', - 'Calendar', - NULL, - 'Calendar', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_privcal', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_privcal', - 'Appointment' ); - -INSERT INTO SOGo_folder_info - ( c_path, c_path1, c_path2, c_path3, c_path4, c_foldername, - c_location, c_quick_location, c_folder_type ) -VALUES - ( '/Users/${USER_ID}/Contacts', - 'Users', - '${USER_ID}', - 'Contacts', - NULL, - 'Contacts', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_contacts', - 'sqlite://localhost${DB}/SOGo_${USER_TABLE}_contacts', - 'Contact' ); - - -DROP TABLE SOGo_${USER_TABLE}_privcal; -CREATE TABLE SOGo_${USER_TABLE}_privcal ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - c_content VARCHAR(100000) NOT NULL, /* the BLOB */ - c_creationdate INT NOT NULL, /* creation date */ - c_lastmodified INT NOT NULL, /* last modification (UPDATE) */ - c_version INT NOT NULL, /* version counter */ - - /* quick fields */ - uid VARCHAR(256) NOT NULL, - startdate INT NOT NULL, - enddate INT NOT NULL, - cycleenddate INT NULL, /* enddate for cyclic events */ - title VARCHAR(1000) NOT NULL, - cycleinfo VARCHAR(1000) NULL, /* property list with cycle infos */ - participants VARCHAR(100000) NOT NULL, /* the CNs of the participants */ - isallday INT NULL, - iscycle INT NULL, /* client needs to fetch to resolve */ - ispublic INT NOT NULL, - status INT NOT NULL, - priority INT NOT NULL, -- for marking high prio apts - isopaque INT 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 */ -); - - -DROP TABLE SOGo_${USER_TABLE}_contacts; -CREATE TABLE SOGo_${USER_TABLE}_contacts ( - c_name VARCHAR(256) NOT NULL PRIMARY KEY, /* the filename */ - c_content VARCHAR(100000) NOT NULL, /* the BLOB */ - c_creationdate INT NOT NULL, /* creation date */ - c_lastmodified INT NOT NULL, /* last modification (UPDATE) */ - c_version INT NOT NULL, /* version counter */ - - /* quick fields */ - givenname VARCHAR(256), - cn VARCHAR(256), - sn VARCHAR(256), - l VARCHAR(256), - mail VARCHAR(256), - o VARCHAR(256), - ou VARCHAR(256), - telephonenumber VARCHAR(256) -); - -EOF -shift -done