[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/setup default_records.inc.php setup.in...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/setup default_records.inc.php setup.in... |
Date: |
Mon, 06 Mar 2006 04:36:05 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Branch:
Changes by: Dave Hall <address@hidden> 06/03/06 04:36:05
Modified files:
setup : default_records.inc.php setup.inc.php
tables_current.inc.php tables_update.inc.php
Log message:
new tables for custom fields, code coming soon, but don't want to fsck
around with more upgrade scripts again
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/setup/default_records.inc.php.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/setup/setup.inc.php.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/setup/tables_current.inc.php.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/setup/tables_update.inc.php.diff?tr1=1.82&tr2=1.83&r1=text&r2=text
Patches:
Index: phpgwapi/setup/default_records.inc.php
diff -u phpgwapi/setup/default_records.inc.php:1.17
phpgwapi/setup/default_records.inc.php:1.18
--- phpgwapi/setup/default_records.inc.php:1.17 Thu Apr 28 08:11:59 2005
+++ phpgwapi/setup/default_records.inc.php Mon Mar 6 04:36:04 2006
@@ -5,7 +5,7 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage setup
- * @version $Id: default_records.inc.php,v 1.17 2005/04/28 08:11:59
powerstat Exp $
+ * @version $Id: default_records.inc.php,v 1.18 2006/03/06 04:36:04
skwashd Exp $
*/
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_languages
(lang_id, lang_name, available) VALUES ('aa','Afar','No')");
@@ -294,3 +294,9 @@
}
//force users to config their install - was dropped sometime ago -
adding it again - skwashd
$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config
VALUES('phpgwapi', 'freshinstall', '1')");
+
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'text\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'number\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'date\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'list\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'db lookup\')');
Index: phpgwapi/setup/setup.inc.php
diff -u phpgwapi/setup/setup.inc.php:1.65 phpgwapi/setup/setup.inc.php:1.66
--- phpgwapi/setup/setup.inc.php:1.65 Thu Apr 28 08:11:59 2005
+++ phpgwapi/setup/setup.inc.php Mon Mar 6 04:36:04 2006
@@ -5,14 +5,14 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage setup
- * @version $Id: setup.inc.php,v 1.65 2005/04/28 08:11:59 powerstat Exp $
+ * @version $Id: setup.inc.php,v 1.66 2006/03/06 04:36:04 skwashd Exp $
* @internal $Source: /cvsroot/phpgwapi/phpgwapi/setup/setup.inc.php,v $
*/
// Basic information about this app
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
- $setup_info['phpgwapi']['version'] = '0.9.17.500';
+ $setup_info['phpgwapi']['version'] = '0.9.17.501';
$setup_info['phpgwapi']['versions']['current_header'] = '1.24';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@@ -39,18 +39,21 @@
$setup_info['phpgwapi']['tables'][] = 'phpgw_history_log';
$setup_info['phpgwapi']['tables'][] = 'phpgw_async';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact';
- $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_org';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_person';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_org';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_org_person';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_addr';
- $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_addr_type';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_note';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_others';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_comm';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_comm_descr';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_comm_type';
- $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_note';
- $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_note_type';
- $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_others';
$setup_info['phpgwapi']['tables'][] = 'phpgw_contact_types';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_addr_type';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_contact_note_type';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_custom_fields';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_cust_field_types';
+ $setup_info['phpgwapi']['tables'][] = 'phpgw_cust_field_values';
// Basic information about this app
$setup_info['notifywindow']['name'] = 'notifywindow';
@@ -60,3 +63,6 @@
$setup_info['notifywindow']['app_order'] = 1;
$setup_info['notifywindow']['tables'] = '';
$setup_info['notifywindow']['hooks'][] = 'home';
+
+
+
Index: phpgwapi/setup/tables_current.inc.php
diff -u phpgwapi/setup/tables_current.inc.php:1.52
phpgwapi/setup/tables_current.inc.php:1.53
--- phpgwapi/setup/tables_current.inc.php:1.52 Thu Apr 28 08:11:59 2005
+++ phpgwapi/setup/tables_current.inc.php Mon Mar 6 04:36:04 2006
@@ -5,7 +5,7 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage setup
- * @version $Id: tables_current.inc.php,v 1.52 2005/04/28 08:11:59
powerstat Exp $
+ * @version $Id: tables_current.inc.php,v 1.53 2006/03/06 04:36:04
skwashd Exp $
* @internal $Source:
/cvsroot/phpgwapi/phpgwapi/setup/tables_current.inc.php,v $
*/
@@ -63,7 +63,7 @@
'account_expires' => array('type' =>
'int','precision' => '4','nullable' => False),
'account_type' => array('type' =>
'char','precision' => '1','nullable' => True),
'person_id' => array('type' =>
'int','precision' => '4','nullable' => True),
- 'account_quota' => array('type' =>
'int','precision' => '4','default' => -1,'nullable' => True)
+ 'account_quota' => array('type' =>
'int','precision' => '4','default' => '-1','nullable' => True)
),
'pk' => array('account_id'),
'fk' => array(),
@@ -269,8 +269,8 @@
'log_account_lid' => array('type' =>
'varchar','precision' => '25','nullable' => False),
'log_app' => array('type' =>
'varchar','precision' => '25','nullable' => False),
'log_severity' => array('type' =>
'char','precision' => '1','nullable' => False),
- 'log_file' => array('type' =>
'varchar','precision' => '255','nullable' => False, 'default' => ''),
- 'log_line' => array('type' => 'int','precision'
=> '4','nullable' => False, 'default' => '0'),
+ 'log_file' => array('type' =>
'varchar','precision' => '255','nullable' => False,'default' => ''),
+ 'log_line' => array('type' => 'int','precision'
=> '4','nullable' => False,'default' => '0'),
'log_msg' => array('type' => 'text','nullable'
=> False)
),
'pk' => array('log_id'),
@@ -331,7 +331,7 @@
'history_owner' => array('type' =>
'int','precision' => '4','nullable' => False),
'history_status' => array('type' =>
'char','precision' => '2','nullable' => False),
'history_new_value' => array('type' =>
'text','nullable' => False),
- 'history_timestamp' => array('type' =>
'timestamp','nullable' => False,'default' => 'current_timestamp'),
+ 'history_timestamp' => array('type' =>
'timestamp','nullable' => False),
'history_old_value' => array('type' =>
'text','nullable' => False)
),
'pk' => array('history_id'),
@@ -363,7 +363,7 @@
),
'pk' => array('contact_id'),
'fk' => array(),
- 'ix' => array('owner', 'access', 'contact_type_id',
array('contact_id', 'cat_id', 'contact_type_id')),
+ 'ix' =>
array('owner','access','contact_type_id',array('0' => True,'1' => 'cat_id','2'
=> 'contact_type_id')),
'uc' => array()
),
'phpgw_contact_person' => array(
@@ -404,7 +404,7 @@
),
'pk' => array(),
'fk' => array(),
- 'ix' => array('org_id', 'active'),
+ 'ix' => array('org_id','active'),
'uc' => array()
),
'phpgw_contact_org_person' => array(
@@ -413,12 +413,12 @@
'person_id' => array('type' =>
'int','precision' => '4','nullable' => False),
'addr_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
'preferred' => array('type' =>
'char','precision' => '1','nullable' => False,'default' => 'N'),
- 'created_on' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'created_on' => array('type' =>
'int','precision' => '4','nullable' => False),
'created_by' => array('type' =>
'int','precision' => '4','nullable' => False)
),
'pk' => array('org_id','person_id'),
'fk' => array(),
- 'ix' => array('addr_id', 'person_id', 'org_id',
'preferred', array('person_id', 'org_id')),
+ 'ix' =>
array('addr_id','person_id','org_id','preferred',array('0' => True,'1' =>
'org_id')),
'uc' => array()
),
'phpgw_contact_addr' => array(
@@ -442,7 +442,7 @@
),
'pk' => array('contact_addr_id'),
'fk' => array(),
- 'ix' => array('contact_id', 'addr_type_id',
'preferred'),
+ 'ix' => array('contact_id','addr_type_id','preferred'),
'uc' => array()
),
'phpgw_contact_note' => array(
@@ -458,7 +458,7 @@
),
'pk' => array('contact_note_id'),
'fk' => array(),
- 'ix' => array('contact_id', 'note_type_id'),
+ 'ix' => array('contact_id','note_type_id'),
'uc' => array()
),
'phpgw_contact_others' => array(
@@ -488,7 +488,7 @@
),
'pk' => array('comm_id'),
'fk' => array(),
- 'ix' => array('comm_data', 'preferred',
'comm_descr_id', 'contact_id', array('comm_id', 'contact_id', 'comm_descr_id')),
+ 'ix' =>
array('comm_data','preferred','comm_descr_id','contact_id',array('0' =>
True,'1' => 'contact_id','2' => 'comm_descr_id')),
'uc' => array()
),
'phpgw_contact_comm_descr' => array(
@@ -499,7 +499,7 @@
),
'pk' => array('comm_descr_id'),
'fk' => array(),
- 'ix' => array('descr', 'comm_type_id'),
+ 'ix' => array('descr','comm_type_id'),
'uc' => array()
),
'phpgw_contact_comm_type' => array(
@@ -511,7 +511,7 @@
),
'pk' => array('comm_type_id'),
'fk' => array(),
- 'ix' => array('type', 'active', 'class'),
+ 'ix' => array('type','active','class'),
'uc' => array()
),
'phpgw_contact_types' => array(
@@ -544,22 +544,44 @@
'fk' => array(),
'ix' => array(),
'uc' => array()
+ ),
+ 'phpgw_cust_fields' => array(
+ 'fd' => array(
+ 'cust_field_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_name' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_type_id' => array('type' =>
'int','precision' => '8','nullable' => False),
+ 'cust_field_label' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_active' => array('type' =>
'varchar','precision' => '255','nullable' => False,'default' => '1')
+ ),
+ 'pk' => array('cust_field_id'),
+ 'fk' => array(),
+ 'ix' => array('cust_field_name','cust_field_type_id'),
+ 'uc' => array()
+ ),
+ 'phpgw_cust_field_types' => array(
+ 'fd' => array(
+ 'cust_field_type_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_type_descr' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_type_active' => array('type' =>
'int','precision' => '8','nullable' => False,'default' => '1')
+ ),
+ 'pk' => array('cust_field_type_id'),
+ 'fk' => array(),
+ 'ix' => array(),
+ 'uc' => array()
+ ),
+ 'phpgw_cust_field_values' => array(
+ 'fd' => array(
+ 'cust_field_value_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_value_val' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_id' => array('type' =>
'int','precision' => '8','nullable' => False),
+ 'appname' => array('type' =>
'varchar','precision' => '25','nullable' => False),
+ 'location' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'rec_id' => array('type' => 'int','precision'
=> '8','nullable' => False)
+ ),
+ 'pk' => array('cust_field_value_id'),
+ 'fk' => array(),
+ 'ix' =>
array('cust_field_value_val','cust_field_id','appname','location','rec_id'),
+ 'uc' => array()
)
);
-
- /* Try to fix this unfortunate case for mysql 3.22.X in php4 at least */
- if(phpversion() >= '4.0.5' && @$GLOBALS['phpgw_setup']->db->Type ==
'mysql')
- {
- $_ver_str = @mysql_get_server_info();
- $_ver_arr = explode(".",$_ver_str);
- if((intval($_ver_arr[0]) == 3) && (intval($_ver_arr[1]) < 23))
- {
- $phpgw_baseline['phpgw_lang']['fd']['message_id'] =
array(
- 'type' => 'varchar',
- 'precision' => 150,
- 'nullable' => false,
- 'default' => ''
- );
- }
- }
?>
Index: phpgwapi/setup/tables_update.inc.php
diff -u phpgwapi/setup/tables_update.inc.php:1.82
phpgwapi/setup/tables_update.inc.php:1.83
--- phpgwapi/setup/tables_update.inc.php:1.82 Mon May 2 16:38:57 2005
+++ phpgwapi/setup/tables_update.inc.php Mon Mar 6 04:36:04 2006
@@ -5,595 +5,11 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage setup
- * @version $Id: tables_update.inc.php,v 1.82 2005/05/02 16:38:57
fipsfuchs Exp $
+ * @version $Id: tables_update.inc.php,v 1.83 2006/03/06 04:36:04
skwashd Exp $
* @internal $Source:
/cvsroot/phpgwapi/phpgwapi/setup/tables_update.inc.php,v $
*/
- // Include older phpGroupWare update support
- // include('tables_update_0_9_9.inc.php');
- // include('tables_update_0_9_10.inc.php');
- // include('tables_update_0_9_12.inc.php');
-
- // This is since the last release
-
- $test[] = '0.9.12';
-
- /**
- * Upgrade API from 0.9.12 to 0.9.13.001
- *
- * @return string API version after update
- */
- function phpgwapi_upgrade0_9_12()
- {
- //global $setup_info,$phpgw_setup;
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.001';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.001';
- function phpgwapi_upgrade0_9_13_001()
- {
- //global $setup_info,$phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_categories','cat_access',
array('type' => 'varchar', 'precision' => 7));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.002';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.002';
- function phpgwapi_upgrade0_9_13_002()
- {
- //global $setup_info,$phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_accounts','account_file_space',
array ('type' => 'varchar', 'precision' => 25));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.003';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.003';
- function phpgwapi_upgrade0_9_13_003()
- {
- //global $setup_info,$phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_access_log','sessionid',array('type'
=> 'char', 'precision' => 32));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.004';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
-
- /**
- * phpgroupware main dummy class
- *
- * @package phpgwapi
- * @subpackage setup
- * @ignore
- */
- class phpgw
- {
- var $common;
- var $accounts;
- var $applications;
- var $db;
- }
-
-
- $test[] = '0.9.13.004';
- function phpgwapi_upgrade0_9_13_004()
- {
- //global $setup_info, $phpgw_setup, $phpgw_info, $phpgw;
-
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_access_log','account_id',array('type'
=> 'int', 'precision' => 4, 'default' => 0, 'nullable' => False));
-
- $phpgw = new phpgw;
- $phpgw->common = CreateObject('phpgwapi.common');
-
- $GLOBALS['phpgw_setup']->db->query("SELECT
config_name,config_value FROM phpgw_config WHERE config_name LIKE 'ldap%' OR
config_name='account_repository'",__LINE__,__FILE__);
- while ($GLOBALS['phpgw_setup']->oProc->next_record())
- {
-
$config[$GLOBALS['phpgw_setup']->oProc->f('config_name')] =
$GLOBALS['phpgw_setup']->oProc->f('config_value');
- }
- $phpgw_info['server']['ldap_host'] =
$config['ldap_host'];
- $phpgw_info['server']['ldap_context'] =
$config['ldap_context'];
- $phpgw_info['server']['ldap_group_context'] =
$config['ldap_group_context'];
- $phpgw_info['server']['ldap_root_dn'] =
$config['ldap_root_dn'];
- $phpgw_info['server']['ldap_root_pw'] =
$config['ldap_root_pw'];
- $phpgw_info['server']['account_repository'] =
$config['account_repository'];
-
- $accounts = CreateObject('phpgwapi.accounts');
- $accounts->db = $GLOBALS['phpgw_setup']->db;
-
- $GLOBALS['phpgw_setup']->db->query("select * from
phpgw_access_log");
- while ($GLOBALS['phpgw_setup']->oProc->next_record())
- {
- $lid =
explode('@',$GLOBALS['phpgw_setup']->oProc->f('loginid'));
- $account_lid = $lid[0];
- $account_id = $accounts->name2id($account_lid);
-
- $GLOBALS['phpgw_setup']->db->query("update
phpgw_access_log set account_id='" . $account_id
- . "' where sessionid='" .
$GLOBALS['phpgw_setup']->oProc->f('sessionid') . "'");
- }
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.005';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.005';
- function phpgwapi_upgrade0_9_13_005()
- {
- //global $setup_info, $phpgw_setup;
-
- $newtbldef = array(
- 'fd' => array(
- 'account_id' => array('type' => 'auto',
'nullable' => false),
- 'account_lid' => array('type' => 'varchar',
'precision' => 25, 'nullable' => false),
- 'account_pwd' => array('type' => 'varchar',
'precision' => 32, 'nullable' => false),
- 'account_firstname' => array('type' =>
'varchar', 'precision' => 50),
- 'account_lastname' => array('type' =>
'varchar', 'precision' => 50),
- 'account_permissions' => array('type' =>
'text', 'nullable' => true),
- 'account_groups' => array('type' => 'varchar',
'precision' => 30, 'nullable' => true),
- 'account_lastlogin' => array('type' => 'int',
'precision' => 4, 'nullable' => true),
- 'account_lastloginfrom' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => true),
- 'account_lastpwd_change' => array('type' =>
'int', 'precision' => 4, 'nullable' => true),
- 'account_status' => array('type' => 'char',
'precision' => 1, 'nullable' => false, 'default' => 'A'),
- 'account_expires' => array('type' => 'int',
'precision' => 4),
- 'account_type' => array('type' => 'char',
'precision' => 1, 'nullable' => true)
- ),
- 'pk' => array('account_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array('account_lid')
- );
-
-
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_accounts',$newtbldef,'account_file_space');
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.006';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.006';
- function phpgwapi_upgrade0_9_13_006()
- {
- //global $setup_info, $phpgw_setup;
-
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_log', array(
- 'fd' => array(
- 'log_id' => array('type' =>
'auto', 'precision' => 4, 'nullable' => False),
- 'log_date' => array('type' =>
'timestamp', 'nullable' => False),
- 'log_user' => array('type' =>
'int', 'precision' => 4, 'nullable' => False),
- 'log_app' => array('type' =>
'varchar', 'precision' => 50, 'nullable' => False),
- 'log_severity' => array('type' =>
'char', 'precision' => 1, 'nullable' => False)
- ),
- 'pk' => array('log_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- )
- );
-
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_log_msg', array(
- 'fd' => array(
- 'log_msg_log_id' => array('type'
=> 'auto', 'precision' => 4, 'nullable' => False),
- 'log_msg_seq_no' => array('type'
=> 'int', 'precision' => 4, 'nullable' => False),
- 'log_msg_date' => array('type'
=> 'timestamp', 'nullable' => False),
- 'log_msg_tx_fid' => array('type'
=> 'varchar', 'precision' => 4, 'nullable' => True),
- 'log_msg_tx_id' => array('type'
=> 'varchar', 'precision' => 4, 'nullable' => True),
- 'log_msg_severity' => array('type'
=> 'char', 'precision' => 1, 'nullable' => False),
- 'log_msg_code' => array('type'
=> 'varchar', 'precision' => 30, 'nullable' => False),
- 'log_msg_msg' => array('type'
=> 'text', 'nullable' => False),
- 'log_msg_parms' => array('type'
=> 'text', 'nullable' => False)
- ),
- 'pk' => array('log_msg_log_id',
'log_msg_seq_no'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- )
- );
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.007';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.007';
- function phpgwapi_upgrade0_9_13_007()
- {
- //global $setup_info, $phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_log_msg','log_msg_log_id',array('type'
=> 'int', 'precision' => 4, 'nullable'=> False));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.008';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.008';
- function phpgwapi_upgrade0_9_13_008()
- {
- //global $setup_info, $phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_log_msg','log_msg_file',array('type'
=> 'varchar', 'precision' => 255, 'nullable'=> False));
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_log_msg','log_msg_line',array('type'
=> 'int', 'precision' => 4, 'nullable'=> False));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.009';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.009';
- function phpgwapi_upgrade0_9_13_009()
- {
- //global $setup_info, $phpgw_setup;
-
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_interserv', array(
- 'fd' => array(
- 'server_id' => array('type' =>
'auto', 'nullable' => False),
- 'server_name' => array('type' =>
'varchar', 'precision' => 64, 'nullable' => True),
- 'server_host' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'server_url' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'trust_level' => array('type' => 'int',
'precision' => 4),
- 'trust_rel' => array('type' => 'int',
'precision' => 4),
- 'username' => array('type' =>
'varchar', 'precision' => 64, 'nullable' => True),
- 'password' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'admin_name' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'admin_email' => array('type' =>
'varchar', 'precision' => 255, 'nullable' => True),
- 'server_mode' => array('type' =>
'varchar', 'precision' => 16, 'nullable' => False, 'default' => 'xmlrpc'),
- 'server_security' => array('type' =>
'varchar', 'precision' => 16,'nullable' => True)
- ),
- 'pk' => array('server_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- )
- );
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.010';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.010';
- function phpgwapi_upgrade0_9_13_010()
- {
- //global $setup_info, $phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_sessions','session_lid',array('type'
=> 'varchar', 'precision' => 255, 'nullable'=> False));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.011';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.011';
- function phpgwapi_upgrade0_9_13_011()
- {
- //global $setup_info, $phpgw_setup;
-
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_vfs', array(
- 'fd' => array(
- 'file_id' => array('type' =>
'auto','nullable' => False),
- 'owner_id' => array('type' => 'int',
'precision' => 4,'nullable' => False),
- 'createdby_id' => array('type' =>
'int', 'precision' => 4,'nullable' => True),
- 'modifiedby_id' => array('type' =>
'int', 'precision' => 4,'nullable' => True),
- 'created' => array('type' =>
'date','nullable' => False,'default' => '1970-01-01'),
- 'modified' => array('type' =>
'date','nullable' => True),
- 'size' => array('type' => 'int',
'precision' => 4,'nullable' => True),
- 'mime_type' => array('type' =>
'varchar', 'precision' => 150,'nullable' => True),
- 'deleteable' => array('type' => 'char',
'precision' => 1,'nullable' => True,'default' => 'Y'),
- 'comment' => array('type' =>
'text','nullable' => True),
- 'app' => array('type' => 'varchar',
'precision' => 25,'nullable' => True),
- 'directory' => array('type' =>
'text','nullable' => True),
- 'name' => array('type' =>
'text','nullable' => False),
- 'link_directory' => array('type' =>
'text','nullable' => True),
- 'link_name' => array('type' =>
'text','nullable' => True),
- 'version' => array('type' => 'varchar',
'precision' => 30,'nullable' => False,'default' => '0.0.0.0')
- ),
- 'pk' => array('file_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- )
- );
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.012';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.012';
- function phpgwapi_upgrade0_9_13_012()
- {
- //global $setup_info, $phpgw_setup;
-
-
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_applications', 'app_tables',
array('type' => 'text'));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.013';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.013';
- function phpgwapi_upgrade0_9_13_013()
- {
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_history_log', array(
- 'fd' => array(
- 'history_id' => array('type' =>
'auto', 'precision' => 4, 'nullable' => False),
- 'history_record_id' => array('type' =>
'int', 'precision' => 4, 'nullable' => False),
- 'history_appname' => array('type' =>
'varchar', 'precision' => 64, 'nullable' => False),
- 'history_owner' => array('type' =>
'int', 'precision' => 4, 'nullable' => False),
- 'history_status' => array('type' =>
'char', 'precision' => 2, 'nullable' => False),
- 'history_new_value' => array('type' =>
'text', 'nullable' => False),
- 'history_timestamp' => array('type' =>
'timestamp', 'nullable' => False, 'default' => 'current_timestamp')
-
- ),
- 'pk' => array('history_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- )
- );
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.014';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.014';
- function phpgwapi_upgrade0_9_13_014()
- {
- $GLOBALS['phpgw_setup']->db->query("UPDATE phpgw_applications
SET app_order=100 WHERE app_order IS NULL");
- $GLOBALS['phpgw_setup']->db->query("SELECT * FROM
phpgw_applications");
- while ($GLOBALS['phpgw_setup']->oProc->next_record())
- {
- $app_name[] =
$GLOBALS['phpgw_setup']->oProc->f('app_name');
- $app_title[] =
$GLOBALS['phpgw_setup']->oProc->f('app_title');
- $app_enabled[] =
$GLOBALS['phpgw_setup']->oProc->f('app_enabled');
- $app_order[] =
$GLOBALS['phpgw_setup']->oProc->f('app_order');
- $app_tables[] =
$GLOBALS['phpgw_setup']->oProc->f('app_tables');
- $app_version[] =
$GLOBALS['phpgw_setup']->oProc->f('app_version');
- }
-
- $GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_applications');
-
- $GLOBALS['phpgw_setup']->oProc->CreateTable(
- 'phpgw_applications', array(
- 'fd' => array(
- 'app_id' => array('type' => 'auto',
'precision' => 4, 'nullable' => false),
- 'app_name' => array('type' =>
'varchar', 'precision' => 25, 'nullable' => false),
- 'app_title' => array('type' =>
'varchar', 'precision' => 50),
- 'app_enabled' => array('type' => 'int',
'precision' => 4),
- 'app_order' => array('type' => 'int',
'precision' => 4),
- 'app_tables' => array('type' =>
'varchar', 'precision' => 255),
- 'app_version' => array('type' =>
'varchar', 'precision' => 20, 'nullable' => false, 'default' => '0.0')
- ),
- 'pk' => array('app_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array('app_name')
- )
- );
-
- $rec_count = count($app_name);
- for($rec_loop=0;$rec_loop<$rec_count;$rec_loop++)
- {
- $GLOBALS['phpgw_setup']->db->query('INSERT INTO
phpgw_applications(app_id,app_name,app_title,app_enabled,app_order,app_tables,app_version)
'
- . 'VALUES('.($rec_loop +
1).",'".$app_name[$rec_loop]."','".$app_title[$rec_loop]."',".$app_enabled[$rec_loop].','.$app_order[$rec_loop].",'".$app_tables[$rec_loop]."','".$app_version[$rec_loop]."')");
- }
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.015';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.015';
- function phpgwapi_upgrade0_9_13_015()
- {
- /* Skip this for mysql 3.22.X in php4 at least */
- if(phpversion() >= '4.0.5' &&
@$GLOBALS['phpgw_setup']->db->Type == 'mysql')
- {
- $_ver_str = @mysql_get_server_info();
- $_ver_arr = explode(".",$_ver_str);
- $_ver = $_ver_arr[1];
- if(intval($_ver) < 23)
- {
-
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016';
- return
$GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
- }
-
- $GLOBALS['phpgw_setup']->oProc->AlterColumn(
- 'lang',
- 'message_id',
- array(
- 'type' => 'varchar',
- 'precision' => 255,
- 'nullable' => false,
- 'default' => ''
- )
- );
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.016';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.016';
- function phpgwapi_upgrade0_9_13_016()
- {
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','acl_manager','hook_acl_manager.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','add_def_pref','hook_add_def_pref.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','after_navbar','hook_after_navbar.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','deleteaccount','hook_deleteaccount.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','config','hook_config.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','manual','hook_manual.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('admin','view_user','hook_view_user.inc.php')");
-
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('preferences','admin_deleteaccount','hook_admin_deleteaccount.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('preferences','config','hook_config.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('preferences','manual','hook_manual.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('preferences','preferences','hook_preferences.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('preferences','settings','hook_settings.inc.php')");
-
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','about','hook_about.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','add_def_pref','hook_add_def_pref.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','config_validate','hook_config_validate.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','deleteaccount','hook_deleteaccount.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','home','hook_home.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','manual','hook_manual.inc.php')");
- $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_hooks
(hook_appname,hook_location,hook_filename) VALUES
('addressbook','notifywindow','hook_notifywindow.inc.php')");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.017';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.017';
- function phpgwapi_upgrade0_9_13_017()
- {
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_history_log','history_old_value',array('type'
=> 'text','nullable' => False));
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.13.018';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.13.018';
- function phpgwapi_upgrade0_9_13_018()
- {
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.000';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.000';
- function phpgwapi_upgrade0_9_14_000()
- {
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.001';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.001';
- function phpgwapi_upgrade0_9_14_001()
- {
- // Fix bug from update script in 0.9.11.004/5:
- // column config_app was added to table phpgw_config (which
places it as last column),
- // but in the tables_current.inc.php it was added as first
column.
- // When setup / schemaproc wants to do the AlterColum it
recreates the table for pgSql,
- // as pgSql could not change the column-type. This recreation
is can not be based on
- // tables_current, but on running tables_baseline throught all
update-scripts.
- // Which gives at the end two different versions of the table
on new or updated installs.
- // I fix it now in the (wrong) order of the tables_current, as
some apps might depend on!
-
- $confs = array();
- $GLOBALS['phpgw_setup']->db->query("SELECT * FROM
phpgw_config");
- while ($GLOBALS['phpgw_setup']->oProc->next_record())
- {
- $confs[] = array(
- 'config_app' =>
$GLOBALS['phpgw_setup']->oProc->f('config_app'),
- 'config_name' =>
$GLOBALS['phpgw_setup']->oProc->f('config_name'),
- 'config_value' =>
$GLOBALS['phpgw_setup']->oProc->f('config_value')
- );
- }
- $GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_config');
-
-
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_config',array(
- 'fd' => array(
- 'config_app' => array('type' => 'varchar',
'precision' => 50),
- 'config_name' => array('type' => 'varchar',
'precision' => 255, 'nullable' => false),
- 'config_value' => array('type' => 'text')
- ),
- 'pk' => array(),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array('config_name')
- ));
-
- foreach($confs as $conf)
- {
- $GLOBALS['phpgw_setup']->db->query(
- "INSERT INTO phpgw_config
(config_app,config_name,config_value) VALUES ('".
-
$conf['config_app']."','".$conf['config_name']."','".$conf['config_value']."')");
- }
-
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages SET
available='Yes' WHERE lang_id='cs'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.002';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.002';
- function phpgwapi_upgrade0_9_14_002()
- {
- // 0.9.14.5xx are the development-versions of the 0.9.16
release (based on the 0.9.14 api)
- // as 0.9.15.xxx are already used in HEAD
-
- // this is the 0.9.15.003 update, needed for the new
filemanager and vfs-classes in the api
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type'
=> 'text', 'nullable' => True));
-
- // this is the 0.9.15.004 update, needed for the polish
translations
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages set
available='Yes' WHERE lang_id='pl'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.500';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.003';
- function phpgwapi_upgrade0_9_14_003()
- {
- // 0.9.14.5xx are the development-versions of the 0.9.16
release (based on the 0.9.14 api)
- // as 0.9.15.xxx are already used in HEAD
-
- // this is the 0.9.15.003 update, needed for the new
filemanager and vfs-classes in the api
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type'
=> 'text', 'nullable' => True));
-
- // this is the 0.9.15.004 update, needed for the polish
translations
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages set
available='Yes' WHERE lang_id='pl'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.500';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.004';
- function phpgwapi_upgrade0_9_14_004()
- {
- // 0.9.14.5xx are the development-versions of the 0.9.16
release (based on the 0.9.14 api)
- // as 0.9.15.xxx are already used in HEAD
-
- // this is the 0.9.15.003 update, needed for the new
filemanager and vfs-classes in the api
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type'
=> 'text', 'nullable' => True));
-
- // this is the 0.9.15.004 update, needed for the polish
translations
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages set
available='Yes' WHERE lang_id='pl'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.500';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.005';
- function phpgwapi_upgrade0_9_14_005()
- {
- // 0.9.14.5xx are the development-versions of the 0.9.16
release (based on the 0.9.14 api)
- // as 0.9.15.xxx are already used in HEAD
-
- // this is the 0.9.15.003 update, needed for the new
filemanager and vfs-classes in the api
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type'
=> 'text', 'nullable' => True));
-
- // this is the 0.9.15.004 update, needed for the polish
translations
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages set
available='Yes' WHERE lang_id='pl'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.500';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
- $test[] = '0.9.14.006';
- function phpgwapi_upgrade0_9_14_006()
- {
- // 0.9.14.5xx are the development-versions of the 0.9.16
release (based on the 0.9.14 api)
- // as 0.9.15.xxx are already used in HEAD
-
- // this is the 0.9.15.003 update, needed for the new
filemanager and vfs-classes in the api
-
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_vfs','content', array ('type'
=> 'text', 'nullable' => True));
-
- // this is the 0.9.15.004 update, needed for the polish
translations
- $GLOBALS['phpgw_setup']->db->query("UPDATE languages set
available='Yes' WHERE lang_id='pl'");
-
- $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.500';
- return $GLOBALS['setup_info']['phpgwapi']['currentver'];
- }
-
+ // Must be running 0.9.14.007 or later in order to upgrade to 0.9.18
$test[] = '0.9.14.007';
function phpgwapi_upgrade0_9_14_007()
{
@@ -1741,4 +1157,60 @@
{
return $GLOBALS['setup_info']['phpgwapi']['currentver']=
'0.9.17.500';
}
+
+
+ $test[] = '0.9.17.500';
+ function phpgwapi_upgrade0_9_17_500()
+ {
+
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_cust_fields',array(
+ 'fd' => array(
+ 'cust_field_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_name' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_type_id' => array('type' =>
'int','precision' => '8','nullable' => False),
+ 'cust_field_label' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_active' => array('type' =>
'varchar','precision' => '255','nullable' => False,'default' => '1')
+ ),
+ 'pk' => array('cust_field_id'),
+ 'fk' => array(),
+ 'ix' => array('cust_field_name','cust_field_type_id'),
+ 'uc' => array()
+ ));
+
+
+
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_cust_field_types',array(
+ 'fd' => array(
+ 'cust_field_type_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_type_descr' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_type_active' => array('type' =>
'int','precision' => '8','nullable' => False,'default' => '1')
+ ),
+ 'pk' => array('cust_field_type_id'),
+ 'fk' => array(),
+ 'ix' => array(),
+ 'uc' => array()
+ ));
+
+
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_cust_field_values',array(
+ 'fd' => array(
+ 'cust_field_value_id' => array('type' =>
'auto','nullable' => False),
+ 'cust_field_value_val' => array('type' =>
'varchar','precision' => '255','nullable' => False),
+ 'cust_field_id' => array('type' =>
'int','precision' => '8','nullable' => False),
+ 'appname' => array('type' =>
'varchar','precision' => '25','nullable' => False),
+ 'location' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'rec_id' => array('type' => 'int','precision'
=> '8','nullable' => False)
+ ),
+ 'pk' => array('cust_field_value_id'),
+ 'fk' => array(),
+ 'ix' =>
array('cust_field_value_val','cust_field_id','appname','location','rec_id'),
+ 'uc' => array()
+ ));
+
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'text\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'number\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'date\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'list\')');
+ $GLOBALS['phpgw_setup']->oProc->query('INSERT INTO
phpgw_cust_field_types(cust_field_type_descr) VALUES(\'db lookup\')');
+
+ $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.17.501';
+ return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+ }
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/setup default_records.inc.php setup.in...,
Dave Hall <=