diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/build.xml.in ./build.xml.in --- ../open-xchange-0.8.2-RC2-origin/build.xml.in 2006-02-08 16:02:21.000000000 +0100 +++ ./build.xml.in 2006-02-07 19:12:21.000000000 +0100 @@ -43,5 +43,5 @@ - + @@ -55,5 +55,5 @@ - + diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/conf/groupware/intranet.conf ./conf/groupware/intranet.conf --- ../open-xchange-0.8.2-RC2-origin/conf/groupware/intranet.conf 2006-02-08 16:02:21.000000000 +0100 +++ ./conf/groupware/intranet.conf 2006-02-08 23:12:03.000000000 +0100 @@ -130,16 +130,16 @@ # DATABASE identifiert for SYSDATE -SYSDATE='now' +SYSDATE=now() # DATABASE identifier for CURRENT_DATE -# SQL_TODAY='today' +SQL_TODAY=date(now()) # Sequence SQL-String for DATABASE # Example for POSTGRES -seq-fid=SELECT nextval ('fid') -seq-import_id=SELECT nextval ('import_id') -seq-insert_id=SELECT nextval ('insert_id') -seq-profile_id=SELECT nextval ('profile_id') -seq-serial_id=SELECT nextval ('serial_id') +seq-fid=SELECT select_fid() +seq-import_id=SELECT select_import_id() +seq-insert_id=SELECT select_insert_id() +seq-profile_id=SELECT select_profile_id() +seq-serial_id=SELECT select_serial_id() # Example for ORACLE #seq-fid="SELECT fid.nextval" diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/conf/webmail/system.cfg ./conf/webmail/system.cfg --- ../open-xchange-0.8.2-RC2-origin/conf/webmail/system.cfg 2006-02-08 16:02:21.000000000 +0100 +++ ./conf/webmail/system.cfg 2006-02-07 19:12:21.000000000 +0100 @@ -161,3 +161,3 @@ # ^^^^^^^^^^^^^^^^^^^^^ # usrdata delete -sql-fieldmapname-usrdata_delete="delete" \ Kein Zeilenumbruch am Dateiende. +sql-fieldmapname-usrdata_delete="delete_it" diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/configure.in ./configure.in --- ../open-xchange-0.8.2-RC2-origin/configure.in 2006-02-08 16:02:21.000000000 +0100 +++ ./configure.in 2006-02-07 19:12:21.000000000 +0100 @@ -239,5 +239,5 @@ dnl #define the dburl dburl="jdbc:postgresql://$dbhost/$dbname" -AC_ARG_WITH(dburl, AC_HELP_STRING([--with-dbdriver=DRIVER], +AC_ARG_WITH(dburl, AC_HELP_STRING([--with-dburl=DRIVER], [specify database url (default is jdbc:postgresql://$dbname/$dbuser)]), [if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-dburl requires a value'); else dburl="$withval"; fi], @@ -792,4 +792,5 @@ conf/admintools.conf system/setup/init_ldap.ldif +system/setup/create_mysql_database.sql src/com/openexchange/server/Version.java ) diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/m4/ox.m4 ./m4/ox.m4 --- ../open-xchange-0.8.2-RC2-origin/m4/ox.m4 2006-02-08 16:02:20.000000000 +0100 +++ ./m4/ox.m4 2006-02-07 19:12:21.000000000 +0100 @@ -63,5 +63,5 @@ Class.forName("[$dbdriver]"); System.out.print("found.\nInvoke and test connection to database ... "); - Connection con = DriverManager.getConnection("jdbc:postgresql://[$dbhost]/[$dbname]", "[$dbuser]", "[$dbpass]"); + Connection con = DriverManager.getConnection("[$dburl]", "[$dbuser]", "[$dbpass]"); System.out.print("done\n"); con.close(); diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/sbin/addusersql_ox.in ./sbin/addusersql_ox.in --- ../open-xchange-0.8.2-RC2-origin/sbin/addusersql_ox.in 2006-02-08 16:02:21.000000000 +0100 +++ ./sbin/addusersql_ox.in 2006-02-08 22:40:01.000000000 +0100 @@ -139,4 +139,9 @@ fi +if [ "$SQL_PASS" = "" ] +then + SQL_PASS=$DEFAULT_SQL_PASS +fi + if [ "$ERROR" = "y" ] then @@ -148,4 +153,8 @@ @JAVA@ -Dopenexchange.propfile=@oxgroupwaresysconfdir@/system.properties -classpath @oxlibdir@/comfiretools.jar:@oxlibdir@/nas.jar:@jdbcjar@ com.openexchange.tools.oxfolder.OXFolderAction addUser $USERNAME $PREF_LANG 2>&1 >/dev/null -echo `$SQL_BIN -h $SQL_HOST -U $SQL_USER -d $SQL_DB -X -c "INSERT INTO $RIGHTS_TABLE SELECT creating_date, created_from, changing_date, changed_from,text('$USERNAME'), addr_u, addr_r, addr_d, cont_u, cont_r, cont_d, data_u, data_r, data_d, serie_u, serie_r, serie_d, task_u, task_r, task_d, refer, proj_u, proj_r, proj_d, dfolder_u, dfolder_r, dfolder_d, doc_u, doc_r, doc_d, knowl_u, knowl_r, knowl_d, bfolder_u, bfolder_r, bfolder_d, bookm_u, bookm_r, bookm_d, pin_u, pin_r, pin_d, forum_n, fentrie_n, setup, pin_public, internal, int_groups, kfolder_u, kfolder_r, kfolder_d, webmail FROM $TEMPLATE_TABLE WHERE login LIKE '$TEMPLATE'" | $AWK_BIN {'print $1'}` +# echo `$SQL_BIN -h $SQL_HOST -U $SQL_USER -d $SQL_DB -X -c "INSERT INTO $RIGHTS_TABLE SELECT creating_date, created_from, changing_date, changed_from,text('$USERNAME'), addr_u, addr_r, addr_d, cont_u, cont_r, cont_d, data_u, data_r, data_d, serie_u, serie_r, serie_d, task_u, task_r, task_d, refer, proj_u, proj_r, proj_d, dfolder_u, dfolder_r, dfolder_d, doc_u, doc_r, doc_d, knowl_u, knowl_r, knowl_d, bfolder_u, bfolder_r, bfolder_d, bookm_u, bookm_r, bookm_d, pin_u, pin_r, pin_d, forum_n, fentrie_n, setup, pin_public, internal, int_groups, kfolder_u, kfolder_r, kfolder_d, webmail FROM $TEMPLATE_TABLE WHERE login LIKE '$TEMPLATE'" | $AWK_BIN {'print $1'}` +mysql -h $SQL_HOST -u $SQL_USER --password=$SQL_PASS $SQL_DB -e "INSERT INTO $RIGHTS_TABLE SELECT creating_date, created_from, changing_date, changed_from,'$USERNAME', addr_u, addr_r, addr_d, cont_u, cont_r, cont_d, data_u, data_r, data_d, serie_u, serie_r, serie_d, task_u, task_r, task_d, refer, proj_u, proj_r, proj_d, dfolder_u, dfolder_r, dfolder_d, doc_u, doc_r, doc_d, knowl_u, knowl_r, knowl_d, bfolder_u, bfolder_r, bfolder_d, bookm_u, bookm_r, bookm_d, pin_u, pin_r, pin_d, forum_n, fentrie_n, setup, pin_public, internal, int_groups, kfolder_u, kfolder_r, kfolder_d, webmail FROM $TEMPLATE_TABLE WHERE login LIKE '$TEMPLATE'" | $AWK_BIN {'print $1'} >/dev/null 2>&1 +if [ $? -eq 0 ]; then + echo INSERT +fi diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/sbin/dbinit_ox.in ./sbin/dbinit_ox.in --- ../open-xchange-0.8.2-RC2-origin/sbin/dbinit_ox.in 2006-02-08 16:02:21.000000000 +0100 +++ ./sbin/dbinit_ox.in 2006-02-08 22:49:42.000000000 +0100 @@ -22,8 +22,9 @@ SQL_DB=$DEFAULT_SQL_DB SQL_USER=$DEFAULT_SQL_USER +SQL_PASS=$DEFAULT_SQL_PASS ###################### INSERT THE STANDARD RIGHTS ######## -$SQL_BIN -h $SQL_HOST -U $SQL_USER -d $SQL_DB -X -c "INSERT INTO $TEMPLATE_TABLE values ('now','admin','now','','default_template','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y');" +mysql -h $SQL_HOST -u $SQL_USER --password=$SQL_PASS $SQL_DB -e "INSERT INTO $TEMPLATE_TABLE values (now(),'admin',now(),'','default_template','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y','y');" ########################################################## diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/sbin/deluser_ox.in ./sbin/deluser_ox.in --- ../open-xchange-0.8.2-RC2-origin/sbin/deluser_ox.in 2006-02-08 16:02:21.000000000 +0100 +++ ./sbin/deluser_ox.in 2006-02-08 22:42:33.000000000 +0100 @@ -111,5 +111,8 @@ "") echo "${done}LDAP Success!" - SQL_INSERT=`$SQL_BIN -h $DEFAULT_SQL_HOST -U $DEFAULT_SQL_USER -d $DEFAULT_SQL_DB -X -c "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" | $AWK_BIN {'print $1'}` + SQL_INSERT=`mysql -h $DEFAULT_SQL_HOST -u $DEFAULT_SQL_USER --password=$DEFAULT_SQL_PASS $DEFAULT_SQL_DB -e "DELETE FROM $RIGHTS_TABLE WHERE login LIKE '$USERNAME'" ` + if [ $? -eq 0 ]; then + SQL_INSERT="DELETE" + fi if [ "$SQL_INSERT" = "DELETE" ] then diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/src/com/openexchange/groupware/InsertHandler.java ./src/com/openexchange/groupware/InsertHandler.java --- ../open-xchange-0.8.2-RC2-origin/src/com/openexchange/groupware/InsertHandler.java 2006-02-08 16:02:21.000000000 +0100 +++ ./src/com/openexchange/groupware/InsertHandler.java 2006-02-08 23:56:24.000000000 +0100 @@ -180,5 +180,5 @@ String table = NAS_REF_RS_NAME.substring(NAS_REF_RS_NAME.lastIndexOf(".")+1, NAS_REF_RS_NAME.length()); - i.append("INSERT INTO \"" + table + "\" ("); + i.append("INSERT INTO " + table + " ("); for (Enumeration e = h.keys(); e.hasMoreElements() ;) { @@ -228,4 +228,8 @@ type = type.toUpperCase(); + System.err.println("ANDREAS : value : " + value); + System.err.println("ANDREAS : type : " + type); + System.err.println("ANDREAS : sysdate : " + GlobalConfig.getParameter("SYSDATE")); + if (type.equals("TEXT")) { if (value == null) { @@ -257,4 +261,6 @@ pst.setTimestamp(a+1,new java.sql.Timestamp(tsf.getDate().getTime())); } + } else if ((type.indexOf("TIMESTAMP")) != -1 && (value.equals(GlobalConfig.getParameter("SYSDATE")))) { + pst.setTimestamp(a+1,new java.sql.Timestamp(System.currentTimeMillis())); } else { if (value == null) { diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/src/com/openexchange/groupware/PortalManagement.java ./src/com/openexchange/groupware/PortalManagement.java --- ../open-xchange-0.8.2-RC2-origin/src/com/openexchange/groupware/PortalManagement.java 2006-02-08 16:02:21.000000000 +0100 +++ ./src/com/openexchange/groupware/PortalManagement.java 2006-02-09 00:05:39.000000000 +0100 @@ -370,5 +370,5 @@ rs = new NasResultSet(no.con).getResultSet( - "SELECT field01, field02, intfield01, created_from, creating_date FROM prg_pin_board WHERE (field03 LIKE 'DisplayInFront') AND ((((date(timestampfield01) <= "+GlobalConfig.getParameter("SYSDATE")+") AND (date(timestampfield02) >= "+GlobalConfig.getParameter("SYSDATE")+")) AND (((user_right LIKE '" + no.getUser() + "') OR (group_right LIKE 'a') OR ((group_right LIKE 'g' AND intfield06 IN (SELECT object_id FROM prg_pin_board_read WHERE (((user_right LIKE '" + no.getUser() + "') OR (group_right IN (" + no. getMemberInGroups() + ")))))) OR ((group_right LIKE 'g' AND intfield06 IN (SELECT object_id FROM prg_pin_board_read WHERE ((user_right IS NULL) AND (group_right IS NULL)))))))))) ORDER BY timestampfield02 ASC", 0); + "SELECT field01, field02, intfield01, created_from, creating_date FROM prg_pin_board WHERE (field03 LIKE 'DisplayInFront') AND ((((date(timestampfield01) <= "+GlobalConfig.getParameter("SQL_TODAY")+") AND (date(timestampfield02) >= "+GlobalConfig.getParameter("SQL_TODAY")+")) AND (((user_right LIKE '" + no.getUser() + "') OR (group_right LIKE 'a') OR ((group_right LIKE 'g' AND intfield06 IN (SELECT object_id FROM prg_pin_board_read WHERE (((user_right LIKE '" + no.getUser() + "') OR (group_right IN (" + no. getMemberInGroups() + ")))))) OR ((group_right LIKE 'g' AND intfield06 IN (SELECT object_id FROM prg_pin_board_read WHERE ((user_right IS NULL) AND (group_right IS NULL)))))))))) ORDER BY timestampfield02 ASC", 0); int linebreak = 0; diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/system/setup/create_mysql_database.sql.in ./system/setup/create_mysql_database.sql.in --- ../open-xchange-0.8.2-RC2-origin/system/setup/create_mysql_database.sql.in 1970-01-01 01:00:00.000000000 +0100 +++ ./system/setup/create_mysql_database.sql.in 2006-02-07 19:12:21.000000000 +0100 @@ -0,0 +1,117 @@ +DROP DATABASE IF EXISTS @dbname@; + +CREATE DATABASE @dbname@ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + +GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'localhost' IDENTIFIED BY '@dbpass@' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON @dbname@.* TO '@dbuser@'@'%' IDENTIFIED BY '@dbpass@'; + +USE @dbname@; + +DROP TABLE IF EXISTS table_fid; + +CREATE TABLE table_fid ( + id INT NOT NULL AUTO_INCREMENT, + primary key (id) +); + +DROP FUNCTION IF EXISTS select_fid; + +DELIMITER // + +CREATE FUNCTION select_fid () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA +BEGIN + DECLARE xid INT; + INSERT into table_fid VALUES(); + SELECT last_insert_id() into xid; + RETURN xid; +END // + +DELIMITER ; + +DROP TABLE IF EXISTS table_serial_id; + +CREATE TABLE table_serial_id ( + id INT NOT NULL AUTO_INCREMENT, + primary key (id) +) AUTO_INCREMENT = 9; + +DROP FUNCTION IF EXISTS select_serial_id; + +DELIMITER // + +CREATE FUNCTION select_serial_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA +BEGIN + DECLARE xid INT; + INSERT into table_serial_id VALUES(); + SELECT last_insert_id() into xid; + RETURN xid; +END // + +DELIMITER ; + + +DROP TABLE IF EXISTS table_import_id; + +CREATE TABLE table_import_id ( + id INT NOT NULL AUTO_INCREMENT, + primary key (id) +); + +DROP FUNCTION IF EXISTS select_import_id; + +DELIMITER // + +CREATE FUNCTION select_import_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA +BEGIN + DECLARE xid INT; + INSERT into table_import_id VALUES(); + SELECT last_insert_id() into xid; + RETURN xid; +END // + +DELIMITER ; + + +DROP TABLE IF EXISTS table_insert_id; + +CREATE TABLE table_insert_id ( + id INT NOT NULL AUTO_INCREMENT, + primary key (id) +) AUTO_INCREMENT = 101; + +DROP FUNCTION IF EXISTS select_insert_id; + +DELIMITER // + +CREATE FUNCTION select_insert_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA +BEGIN + DECLARE xid INT; + INSERT into table_insert_id VALUES(); + SELECT last_insert_id() into xid; + RETURN xid; +END // + +DELIMITER ; + +DROP TABLE IF EXISTS table_profile_id; + +CREATE TABLE table_profile_id ( + id INT NOT NULL AUTO_INCREMENT, + primary key (id) +); + +DROP FUNCTION IF EXISTS select_profile_id; + +DELIMITER // + +CREATE FUNCTION select_profile_id () RETURNS INTEGER DETERMINISTIC MODIFIES SQL DATA +BEGIN + DECLARE xid INT; + INSERT into table_profile_id VALUES(); + SELECT last_insert_id() into xid; + RETURN xid; +END // + + +DELIMITER ; + diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/system/setup/init_ldap.ldif.in ./system/setup/init_ldap.ldif.in --- ../open-xchange-0.8.2-RC2-origin/system/setup/init_ldap.ldif.in 2006-02-08 16:02:22.000000000 +0100 +++ ./system/setup/init_ldap.ldif.in 2006-02-07 19:12:21.000000000 +0100 @@ -5,4 +5,11 @@ o: @organization@ +dn: @rootdn@ +objectClass: simpleSecurityObject +objectClass: organizationalRole +cn: admin +description: LDAP administrator +userPassword: secret + dn: ou=OxObjects,@basedn@ objectClass: top diff -rNBwU 2 ../open-xchange-0.8.2-RC2-origin/system/setup/init_mysql_database.sql ./system/setup/init_mysql_database.sql --- ../open-xchange-0.8.2-RC2-origin/system/setup/init_mysql_database.sql 1970-01-01 01:00:00.000000000 +0100 +++ ./system/setup/init_mysql_database.sql 2006-02-07 19:12:21.000000000 +0100 @@ -0,0 +1,2102 @@ +CREATE TABLE prg_dlist ( + intfield01 integer, + intfield02 integer, + intfield03 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text +); + +CREATE TABLE del_dlist ( + intfield01 integer, + intfield02 integer, + intfield03 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text +); + +CREATE TABLE foldersettings ( + username text, + sent text, + trash text, + drafts text, + spam text, + templates text +); + +CREATE TABLE layout ( + username text, + fstyle text, + fweigth text, + fcolor text +); + +CREATE TABLE signature ( + username text, + description text, + stext text, + object_id integer +); + +CREATE TABLE sys_import_log ( + import_id integer, + profile_id integer, + created_from text, + creating_date timestamp, + import_table text +); + +CREATE TABLE prg_pin_board ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_dates ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid integer, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text +); + +CREATE TABLE prg_knowledge ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE usr_data ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + password text, + privileges text, + surname text, + forename text, + department text, + version text, + email text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text +); + +CREATE TABLE sys_import_fields ( + profile_id integer, + pos integer, + sys_fieldname text, + alt_fieldname text +); + +CREATE TABLE sys_import_profiles ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + profile_id integer, + profile_name text, + target_table text, + description text, + ow_skip text, + separate character varying(1), + last_sep text, + version text +); + +CREATE TABLE usr_general_rights ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + addr_u text, + addr_r text, + addr_d text, + cont_u text, + cont_r text, + cont_d text, + data_u text, + data_r text, + data_d text, + serie_u text, + serie_r text, + serie_d text, + task_u text, + task_r text, + task_d text, + refer text, + proj_u text, + proj_r text, + proj_d text, + dfolder_u text, + dfolder_r text, + dfolder_d text, + doc_u text, + doc_r text, + doc_d text, + knowl_u text, + knowl_r text, + knowl_d text, + bfolder_u text, + bfolder_r text, + bfolder_d text, + bookm_u text, + bookm_r text, + bookm_d text, + pin_u text, + pin_r text, + pin_d text, + forum_n text, + fentrie_n text, + setup text, + pin_public text, + internal text, + int_groups text, + kfolder_u text, + kfolder_r text, + kfolder_d text, + webmail text +); + +CREATE TABLE sys_groups ( + group_name text, + domain text, + description text, + max_size integer, + leader text, + member text +); + +CREATE TABLE usr_group_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_bookmarks ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_forum_entries ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_notes ( + creating_date timestamp NOT NULL, + created_from text NOT NULL, + changing_date timestamp, + changed_from text, + user_right text NOT NULL, + group_right text NOT NULL, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text NOT NULL, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE usr_rights_profile ( + profile text, + name text, + description text +); + +CREATE TABLE prg_calendar_month ( + version text, + numeric_month integer, + named_month text +); + + +CREATE TABLE prg_calendar_parameter ( + version text, + startday integer, + order_crit integer, + named_text text +); + +CREATE TABLE prg_date_rights ( + object_id integer, + group_right text, + user_right text +); + + +CREATE TABLE prg_dates_times ( + order_crit integer, + times text +); + +CREATE TABLE sys_file_backup ( + type text, + filename text, + content text +); + + +CREATE TABLE sys_export_profiles ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + profile_id integer, + profile_name text, + target_table text, + description text, + ow_skip text, + separate character varying(1), + last_sep text, + version text +); + +CREATE TABLE sys_export_fields ( + profile_id integer, + pos integer, + sys_fieldname text, + alt_fieldname text +); + +CREATE TABLE sys_conf ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + mailaddress text, + mailserver text +); + +CREATE TABLE sys_import ( + import_id integer, + target_table text, + profile_id integer, + mode text, + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text, + field21 text, + field22 text, + field23 text, + field24 text, + field25 text, + field26 text, + field27 text, + field28 text, + field29 text, + field30 text, + field31 text, + field32 text, + field33 text, + field34 text, + field35 text, + field36 text, + field37 text, + field38 text, + field39 text, + field40 text, + field41 text, + field42 text, + field43 text, + field44 text, + field45 text, + field46 text, + field47 text, + field48 text, + field49 text, + field50 text, + field51 text, + field52 text, + field53 text, + field54 text, + field55 text, + field56 text, + field57 text, + field58 text, + field59 text, + field60 text, + field61 text, + field62 text, + field63 text, + field64 text, + field65 text, + field66 text, + field67 text, + field68 text, + field69 text, + field70 text, + field71 text, + field72 text, + field73 text, + field74 text, + field75 text, + field76 text, + field77 text, + field78 text, + field79 text, + field80 text, + timestampfield03 timestamp, + timestampfield04 timestamp +); + +CREATE TABLE usr_setup_rights ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + d_sich text, + d_reset text, + site_builder text, + site_layout text, + user_u text, + user_r text, + user_d text, + group_u text, + group_r text, + group_d text, + usr_track text, + calendar_setup text, + task_track text, + forum_d text, + data_imp text, + module text, + mail_conf text +); + +CREATE TABLE prg_forum_conf ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + days integer, + entries integer +); + +CREATE TABLE del_date_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE del_dates ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid integer, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text +); + +CREATE TABLE del_usr_group_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE sys_import_usr ( + import_id integer, + target_table text, + profile_id integer, + mode text, + rights_profile text, + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + password text, + privileges text, + surname text, + forename text, + department text, + version text, + email text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text +); + +CREATE TABLE sys_gen_rights_template ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + addr_u text, + addr_r text, + addr_d text, + cont_u text, + cont_r text, + cont_d text, + data_u text, + data_r text, + data_d text, + serie_u text, + serie_r text, + serie_d text, + task_u text, + task_r text, + task_d text, + refer text, + proj_u text, + proj_r text, + proj_d text, + dfolder_u text, + dfolder_r text, + dfolder_d text, + doc_u text, + doc_r text, + doc_d text, + knowl_u text, + knowl_r text, + knowl_d text, + bfolder_u text, + bfolder_r text, + bfolder_d text, + bookm_u text, + bookm_r text, + bookm_d text, + pin_u text, + pin_r text, + pin_d text, + forum_n text, + fentrie_n text, + setup text, + pin_public text, + internal text, + int_groups text, + kfolder_u text, + kfolder_r text, + kfolder_d text, + webmail text +); + +CREATE TABLE sys_suse_setup_rights_template ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + login text, + d_sich text, + d_reset text, + site_builder text, + site_layout text, + user_u text, + user_r text, + user_d text, + group_u text, + group_r text, + group_d text, + usr_track text, + calendar_setup text, + task_track text, + forum_d text, + data_imp text, + module text, + mail_conf text +); + +CREATE TABLE prg_pin_board_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_date_resources ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_pin_board_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_forum_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_forum_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_contacts_linkage ( + intfield01 integer, + object_id integer, + field01 text, + field02 text +); + +CREATE TABLE del_contacts ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid int, + pid int, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 integer, + intfield02 integer, + intfield03 integer, + intfield04 integer, + intfield05 integer, + intfield06 integer, + intfield07 integer, + intfield08 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text, + field21 text, + field22 text, + field23 text, + field24 text, + field25 text, + field26 text, + field27 text, + field28 text, + field29 text, + field30 text, + field31 text, + field32 text, + field33 text, + field34 text, + field35 text, + field36 text, + field37 text, + field38 text, + field39 text, + field40 text, + field41 text, + field42 text, + field43 text, + field44 text, + field45 text, + field46 text, + field47 text, + field48 text, + field49 text, + field50 text, + field51 text, + field52 text, + field53 text, + field54 text, + field55 text, + field56 text, + field57 text, + field58 text, + field59 text, + field60 text, + field61 text, + field62 text, + field63 text, + field64 text, + field65 text, + field66 text, + field67 text, + field68 text, + field69 text, + field70 text, + field71 text, + field72 text, + field73 text, + field74 text, + field75 text, + field76 text, + field77 text, + field78 text, + field79 text, + field80 text, + field81 text, + field82 text, + field83 text, + field84 text, + field85 text, + field86 text, + field87 text, + field88 text, + field89 text, + field90 text, + field91 text, + field92 text, + field93 text, + field94 text, + field95 text, + field96 text, + field97 text, + field98 text, + field99 text, + timestampfield03 timestamp, + timestampfield04 timestamp, + image01 MEDIUMBLOB +); + +CREATE TABLE projects ( + intfield01 integer, + fuid integer, + creation_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + sid text, + tid text, + project_startdate timestamp, + project_enddate timestamp, + project_deadline timestamp, + project_reminder timestamp, + project_budget text, + project_effort text, + project_effort_unit text, + project_currency text, + project_type text, + project_kickoff timestamp, + project_description text, + project_goal text, + project_customer text, + project_name text, + project_status text, + project_phase text, + project_number_of_attachments integer, + project_task_folder_id integer, + project_manage_permissions integer, + primary key (intfield01) +); + +CREATE TABLE backup_projects ( + intfield01 integer, + fuid integer, + creation_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + sid text, + tid text, + project_startdate timestamp, + project_enddate timestamp, + project_deadline timestamp, + project_reminder timestamp, + project_budget text, + project_effort text, + project_effort_unit text, + project_currency text, + project_type text, + project_kickoff timestamp, + project_description text, + project_goal text, + project_customer text, + project_name text, + project_status text, + project_phase text, + project_number_of_attachments integer, + project_task_folder_id integer, + project_manage_permissions integer, + primary key (intfield01) +); + +CREATE TABLE projects_participants ( + intfield01 integer, + id VARCHAR(166), + name text, + role integer, + ptype integer, + group_id VARCHAR(166), + merged_permission integer, + primary key (intfield01, id, group_id), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_participants ( + intfield01 integer, + id VARCHAR(166), + name text, + role integer, + ptype integer, + group_id VARCHAR(166), + merged_permission integer, + primary key (intfield01, id, group_id), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE projects_milestones ( + intfield01 integer, + id integer, + name text, + description text, + mdate timestamp, + primary key (intfield01, id), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_milestones ( + intfield01 integer, + id integer, + name text, + description text, + mdate timestamp, + primary key (intfield01, id), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE projects_notes ( + intfield01 integer, + note_id VARCHAR(166), + member_id text, + primary key (intfield01, note_id), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_notes ( + intfield01 integer, + note_id VARCHAR(166), + member_id text, + primary key (intfield01, note_id), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE projects_tasks ( + intfield01 integer, + task_id integer, + primary key (intfield01, task_id), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_tasks ( + intfield01 integer, + task_id integer, + primary key (intfield01, task_id), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE projects_dependencies ( + intfield01 integer, + id integer, + successor text, + dependency_type integer, + object_type integer, + primary key (intfield01, id), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_dependencies ( + intfield01 integer, + id integer, + successor text, + dependency_type integer, + object_type integer, + primary key (intfield01, id), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE projects_antecessors ( + intfield01 integer, + id integer, + antecessor VARCHAR(166), + object_type integer, + primary key (intfield01, id, antecessor), + foreign key (intfield01, id) references projects_dependencies on delete cascade on update cascade +); + +CREATE TABLE backup_projects_antecessors ( + intfield01 integer, + id integer, + antecessor VARCHAR(166), + object_type integer, + primary key (intfield01, id, antecessor), + foreign key (intfield01, id) references backup_projects_dependencies on delete cascade on update cascade +); + +CREATE TABLE projects_puids ( + intfield01 integer, + puid integer, + entity text, + fuid integer, + primary key (intfield01, puid), + foreign key (intfield01) references projects on delete cascade on update cascade +); + +CREATE TABLE backup_projects_puids ( + intfield01 integer, + puid integer, + entity text, + fuid integer, + primary key (intfield01, puid), + foreign key (intfield01) references backup_projects on delete cascade on update cascade +); + +CREATE TABLE prg_forum_abo ( + object_id int, + creating_date timestamp, + created_from text, + user_right text, + email text, + forum_id int +); + +CREATE TABLE prg_projects_milestones ( + object_id int, + sid int, + created_from text, + creating_date timestamp, + changed_from text, + changing_date timestamp, + user_right text, + timestampfield01 timestamp, + timestampfield02 timestamp, + title text, + description text +); + +CREATE TABLE prg_forums ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + archiv text +); + +CREATE TABLE prg_projects ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + timestampfield03 timestamp, + intfield01 integer, + intfield02 double precision, + intfield03 double precision, + intfield04 real, + intfield05 integer, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text +); + +CREATE TABLE del_dates_members ( + object_id int, + member_uid text, + member_name text, + confirm text, + reason text, + pfid integer +); + +CREATE TABLE prg_docufolders ( + creating_date timestamp NOT NULL, + created_from text NOT NULL, + changing_date timestamp, + changed_from text, + user_right text NOT NULL, + group_right text NOT NULL, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE del_docufolders ( + creating_date timestamp NOT NULL, + created_from text NOT NULL, + changing_date timestamp, + changed_from text, + user_right text NOT NULL, + group_right text NOT NULL, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_documents ( + creating_date timestamp NOT NULL, + created_from text NOT NULL, + changing_date timestamp, + changed_from text, + user_right text NOT NULL, + group_right text NOT NULL, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int NOT NULL, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE del_documents ( + creating_date timestamp NOT NULL, + created_from text NOT NULL, + changing_date timestamp, + changed_from text, + user_right text NOT NULL, + group_right text NOT NULL, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int NOT NULL, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_documents_files ( + creating_date timestamp NOT NULL, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int NOT NULL, + intfield03 int NOT NULL, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text NOT NULL, + field04 text NOT NULL, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE del_documents_files ( + creating_date timestamp NOT NULL, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text NOT NULL, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int PRIMARY KEY, + intfield02 int NOT NULL, + intfield03 int NOT NULL, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text NOT NULL, + field02 text, + field03 text NOT NULL, + field04 text NOT NULL, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE attachments ( + id bigint PRIMARY KEY, + module text NOT NULL, + attachedto bigint NOT NULL, + filename text NOT NULL, + filestoragename text NOT NULL, + lastmodified timestamp NOT NULL, + mimetype text NOT NULL, + size bigint NOT NULL +); + +CREATE TABLE prg_bookmarks_folder ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE prg_contacts ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid int, + pid int, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + intfield07 integer, + intfield08 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text, + field21 text, + field22 text, + field23 text, + field24 text, + field25 text, + field26 text, + field27 text, + field28 text, + field29 text, + field30 text, + field31 text, + field32 text, + field33 text, + field34 text, + field35 text, + field36 text, + field37 text, + field38 text, + field39 text, + field40 text, + field41 text, + field42 text, + field43 text, + field44 text, + field45 text, + field46 text, + field47 text, + field48 text, + field49 text, + field50 text, + field51 text, + field52 text, + field53 text, + field54 text, + field55 text, + field56 text, + field57 text, + field58 text, + field59 text, + field60 text, + field61 text, + field62 text, + field63 text, + field64 text, + field65 text, + field66 text, + field67 text, + field68 text, + field69 text, + field70 text, + field71 text, + field72 text, + field73 text, + field74 text, + field75 text, + field76 text, + field77 text, + field78 text, + field79 text, + field80 text, + field81 text, + field82 text, + field83 text, + field84 text, + field85 text, + field86 text, + field87 text, + field88 text, + field89 text, + field90 text, + field91 text, + field92 text, + field93 text, + field94 text, + field95 text, + field96 text, + field97 text, + field98 text, + field99 text, + timestampfield03 timestamp, + timestampfield04 timestamp, + image01 MEDIUMBLOB +); + +CREATE TABLE prg_knowledge_folder ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + intfield01 int, + intfield02 int, + intfield03 int, + intfield04 int, + intfield05 int, + intfield06 int, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text +); + +CREATE TABLE initworkerdb ( + bfno text +); + +CREATE TABLE sys_holiday ( + uniqueid int, + lang text, + hdate date, + userid text, + titel text, + type int4 +); + +CREATE TABLE usr_holiday ( + uniqueid int, + object_id int, + userid text, + clevel int +); + +CREATE TABLE usrdata ( + username text, + replyto text, + vcard text, + signature text, + quotation text, + savecopy text, + htmlview text, + delete_it text, + maxrows integer, + defaultmail text, + bugtrack boolean, + mailheader text, + disposition text, + address_sel text, + preview text, + htmlcompose text, + compose_type text, + color_quotation text, + graphical_emoticons text, + line_wrap integer, + forward text, + signature_pos text +); + +CREATE TABLE usr_settings ( + username text, + mailoption1 text, + mailoption2 text, + mailoption3 text, + area1 text, + area2 text, + area3 text, + area4 text, + area5 text, + area6 text, + area_pos text +); + +CREATE TABLE prg_tasks ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid integer, + order_crit text, + seq_pos integer, + timestampfield01 timestamp, + timestampfield02 timestamp, + timestampfield03 timestamp, + intfield01 integer, + intfield02 double precision, + intfield03 double precision, + intfield04 double precision, + intfield05 double precision, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 integer, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text +); + +CREATE TABLE del_tasks ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + fid integer, + order_crit text, + seq_pos integer, + timestampfield01 timestamp, + timestampfield02 timestamp, + timestampfield03 timestamp, + intfield01 integer, + intfield02 double precision, + intfield03 double precision, + intfield04 double precision, + intfield05 double precision, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 integer, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text +); + +CREATE TABLE prg_tasks_members ( + object_id integer, + member_uid text, + member_name text, + confirm text, + reason text, + pfid integer +); + +CREATE TABLE del_tasks_members ( + object_id integer, + member_uid text, + member_name text, + confirm text, + reason text, + pfid integer +); + +CREATE TABLE prg_tasks_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE del_tasks_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_tasks_notification ( + object_id integer, + member_uid text, + notification text +); + +CREATE TABLE prg_dates_members ( + object_id integer, + member_uid text, + member_name text, + confirm text, + reason text, + pfid integer +); + +CREATE TABLE prg_date_notification ( + object_id integer, + member_uid text, + notification text +); + +CREATE TABLE prg_projects_members ( + object_id integer, + member_uid text, + member_name text, + confirm text, + reason text +); + +CREATE TABLE prg_projects_notification ( + object_id integer, + member_uid text, + notification text +); + +CREATE TABLE prg_projects_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_bookmarks_folder_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_bookmarks_folder_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_bookmarks_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_bookmarks_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_docufolders_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_docufolders_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_documents_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_documents_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_forum_seen ( + forum_id integer, + object_id integer, + username text +); + +CREATE TABLE prg_knowledge_folder_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_knowledge_folder_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_knowledge_mod ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE prg_knowledge_read ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE del_projects ( + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text, + user_right text, + group_right text, + sid text, + tid text, + order_crit text, + timestampfield01 timestamp, + timestampfield02 timestamp, + timestampfield03 timestamp, + intfield01 integer, + intfield02 double precision, + intfield03 double precision, + intfield04 double precision, + intfield05 double precision, + intfield06 integer, + intfield07 integer, + field01 text, + field02 text, + field03 text, + field04 text, + field05 text, + field06 text, + field07 text, + field08 text, + field09 text, + field10 text, + field11 text, + field12 text, + field13 text, + field14 text, + field15 text, + field16 text, + field17 text, + field18 text, + field19 text, + field20 text +); + +CREATE TABLE del_projects_members ( + object_id integer, + member_uid text, + member_name text, + confirm text, + reason text +); + +CREATE TABLE del_projects_rights ( + object_id integer, + group_right text, + user_right text +); + +CREATE TABLE del_projects_milestones ( + object_id int, + sid int, + created_from text, + creating_date timestamp, + changed_from text, + changing_date timestamp, + user_right text, + timestampfield01 timestamp, + timestampfield02 timestamp, + title text, + description text +); + +CREATE TABLE sys_linkage ( + changing_date timestamp NOT NULL, + luid int PRIMARY KEY, + source_id int NOT NULL, + src_table text NOT NULL, + src_field text NOT NULL, + target_id int NOT NULL, + trg_table text NOT NULL, + trg_field text NOT NULL +); + +CREATE TABLE links ( + id bigint PRIMARY KEY, + lastmodified timestamp NOT NULL, + firstid bigint NOT NULL, + firstmodule text NOT NULL, + secondid bigint NOT NULL, + secondmodule text NOT NULL +); + +CREATE TABLE del_linkage ( + changing_date timestamp NOT NULL, + luid int PRIMARY KEY, + source_id int NOT NULL, + src_table text NOT NULL, + src_field text NOT NULL, + target_id int NOT NULL, + trg_table text NOT NULL, + trg_field text NOT NULL +); + +CREATE TABLE oxfolder_tree ( + fuid int, + parent int, + fname text, + module text, + type text, + owner text, + creator text, + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text +); + +CREATE TABLE oxfolder_permissions ( + puid int, + pid int, + role int, + entity text, + sealed int, + fp int, + orp int, + owp int, + odp int +); + +CREATE TABLE oxfolder_standardfolders ( + owner text, + module_calendar int, + module_task int, + module_contact int +); + +CREATE TABLE oxfolder_specialfolders ( + tag text, + fuid int +); + +CREATE table oxfolder_userfolders ( + module_name text, + linksite text, + target text, + img text +); + +CREATE TABLE oxfolder_userfolders_standardfolders ( + owner text, + module text, + fuid int +); + +CREATE TABLE del_oxfolder_tree ( + fuid int, + parent int, + fname text, + module text, + type text, + owner text, + creator text, + creating_date timestamp, + created_from text, + changing_date timestamp, + changed_from text +); + +CREATE TABLE del_oxfolder_permissions ( + puid int, + pid int, + role int, + entity text, + sealed int, + fp int, + orp int, + owp int, + odp int +); + +CREATE TABLE reminder ( + object_id int, + target_id text, + module int, + username text, + alarm timestamp, + description text, + folder text +); + +CREATE TABLE ical_principal ( + object_id int, + principal text, + calendarfolder int, + taskfolder int +); + +CREATE TABLE ical_ids ( + object_id int, + principal_id int, + client_id text, + target_object_id int, + module int +); + +CREATE TABLE vcard_principal ( + object_id int, + principal text, + contactfolder int +); + +CREATE TABLE vcard_ids ( + object_id int, + principal_id int, + client_id text, + target_object_id int +); + +INSERT INTO oxfolder_tree VALUES (1, 0, 'private', 'system', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (2, 0, 'public', 'system', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (3, 0, 'shared', 'system', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (4, 0, 'system', 'system', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (5, 4, 'system_global', 'contact', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (6, 4, 'system_ldap', 'contact', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (7, 0, 'user', 'system', 'system','system', 'system', 'now', 'System', null, null); +INSERT INTO oxfolder_tree VALUES (8, 7, 'projects', 'projects', 'system','system', 'system', 'now', 'System', null, null); + +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 1, 512,'all_ox_users_and_ox_groups', 0, 8, 0, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 2, 512, 'all_ox_users_and_ox_groups', 0, 8, 0, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 3, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 4, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 5, 512, 'all_ox_users_and_ox_groups', 0, 4, 128, 128, 128); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 6, 512, 'all_ox_users_and_ox_groups', 0, 2, 4, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 7, 512, 'all_ox_users_and_ox_groups', 0, 2, 0, 0, 0); +INSERT INTO oxfolder_permissions VALUES (select_serial_id(), 8, 512, 'all_ox_users_and_ox_groups', 0, 8, 4, 2, 2); + +INSERT INTO oxfolder_specialfolders VALUES ('private', 1); +INSERT INTO oxfolder_specialfolders VALUES ('public', 2); +INSERT INTO oxfolder_specialfolders VALUES ('shared', 3); +INSERT INTO oxfolder_specialfolders VALUES ('system', 4); +INSERT INTO oxfolder_specialfolders VALUES ('system_global', 5); +INSERT INTO oxfolder_specialfolders VALUES ('system_ldap', 6); +INSERT INTO oxfolder_specialfolders VALUES ('user', 7); + +INSERT INTO oxfolder_userfolders VALUES ('projects', 'projects/projects_list_all', null, 'folder/item_projects.png');