]> err.no Git - scalable-opengroupware.org/commitdiff
enhanced version
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Sep 2004 09:26:22 +0000 (09:26 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 23 Sep 2004 09:26:22 +0000 (09:26 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@311 d1b88da0-ebda-0310-925b-ed51d893ca5b

OGoContentStore/sql/generate-folderinfo-sql-for-users.sh

index ce7566a2b912746206357136fa6ff357f6d2352d..5e509ba8de218bd089f33e8ee8e8205a95041118 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
 #
 # Usage: generate-folderinfo-sql-for-users user1 [user2] [user3] [...]
 #
@@ -32,8 +32,8 @@ VALUES
     NULL,
     NULL,
     '${USER_ID}', 
-    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/${DB_NAME}/SOGo_user_folder', 
-    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/${DB_NAME}/SOGo_user_folder_quick', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_user_folder_quick', 
     'Container' );
 
 INSERT INTO SOGo_folder_info 
@@ -46,8 +46,22 @@ VALUES
     'Calendar',
      NULL,
     'Calendar', 
-    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/${DB_NAME}/SOGo_${USER_TABLE}_privcal', 
-    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/${DB_NAME}/SOGo_${USER_TABLE}_privcal_quick', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_privcal', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/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', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts', 
+    'http://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}/SOGo_${USER_TABLE}_contacts_quick', 
     'Appointment' );
 
 DROP TABLE SOGo_${USER_TABLE}_privcal_quick;
@@ -68,12 +82,35 @@ CREATE TABLE SOGo_${USER_TABLE}_privcal_quick (
 );
 
 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)
+);
+
+DROP TABLE SOGo_${USER_TABLE}_contacts_quick;
+DROP TABLE SOGo_${USER_TABLE}_contacts;
+
+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 (
   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