[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/setup tables_update.inc.php, 1.4 tables_curr
From: |
sigurdne |
Subject: |
[Phpgroupware-cvs] property/setup tables_update.inc.php, 1.4 tables_current.inc.php, 1.23 setup.inc.php, 1.11 |
Date: |
Tue, 1 Mar 2005 16:04:00 +0100 |
Update of property/setup
Modified Files:
Branch: MAIN
tables_update.inc.php lines: +76 -4
tables_current.inc.php lines: +8 -66
setup.inc.php lines: +4 -8
Log Message:
no message
====================================================
Index: property/setup/tables_update.inc.php
diff -u property/setup/tables_update.inc.php:1.3
property/setup/tables_update.inc.php:1.4
--- property/setup/tables_update.inc.php:1.3 Fri Jan 14 08:50:50 2005
+++ property/setup/tables_update.inc.php Tue Mar 1 15:04:27 2005
@@ -24,10 +24,82 @@
* Update property version from 0.9.15.001 to 0.9.15.002
*/
- $test[] = '0.9.15.001';
- function property_upgrade0_9_15_001()
+ $test[] = '0.9.17.500';
+ function property_upgrade0_9_17_500()
{
- $GLOBALS['setup_info']['property']['currentver'] = '0.9.15.002';
+ $GLOBALS['phpgw_setup']->oProc->CreateTable(
+ 'fm_origin', array(
+ 'fd' => array(
+ 'origin' => array('type' =>
'varchar','precision' => '12','nullable' => False),
+ 'origin_id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'destination' => array('type' =>
'varchar','precision' => '12','nullable' => False),
+ 'destination_id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'user_id' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True)
+ ),
+ 'pk' =>
array('origin','origin_id','destination','destination_id'),
+ 'fk' => array(),
+ 'ix' => array(),
+ 'uc' => array()
+ )
+ );
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_request_origin");
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $origin[]=array(
+ 'origin' =>
$GLOBALS['phpgw_setup']->oProc->f('origin'),
+ 'origin_id' =>
$GLOBALS['phpgw_setup']->oProc->f('origin_id'),
+ 'destination'=> 'request',
+ 'destination_id' =>
$GLOBALS['phpgw_setup']->oProc->f('request_id'),
+ 'entry_date' =>
$GLOBALS['phpgw_setup']->oProc->f('entry_date'),
+ );
+ }
+
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_project_origin");
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $origin[]=array(
+ 'origin' =>
$GLOBALS['phpgw_setup']->oProc->f('origin'),
+ 'origin_id' =>
$GLOBALS['phpgw_setup']->oProc->f('origin_id'),
+ 'destination'=> 'project',
+ 'destination_id' =>
$GLOBALS['phpgw_setup']->oProc->f('project_id'),
+ 'entry_date' =>
$GLOBALS['phpgw_setup']->oProc->f('entry_date'),
+ );
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_entity_origin");
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $origin[]=array(
+ 'origin' =>
$GLOBALS['phpgw_setup']->oProc->f('origin'),
+ 'origin_id' =>
$GLOBALS['phpgw_setup']->oProc->f('origin_id'),
+ 'destination'=> 'entity_' .
$GLOBALS['phpgw_setup']->oProc->f('entity_id') . '_' .
$GLOBALS['phpgw_setup']->oProc->f('cat_id'),
+ 'destination_id' =>
$GLOBALS['phpgw_setup']->oProc->f('id'),
+ 'entry_date' =>
$GLOBALS['phpgw_setup']->oProc->f('entry_date'),
+ );
+ }
+
+ $rec_count = count($origin);
+
+
+ for($i=0;$i<$rec_count;$i++)
+ {
+ $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO
fm_origin(origin,origin_id,destination,destination_id,entry_date) "
+ . "VALUES('"
+ .$origin[$i]['origin']."','"
+ .$origin[$i]['origin_id']."','"
+ .$origin[$i]['destination']."','"
+ .$origin[$i]['destination_id']."','"
+ .$origin[$i]['entry_date']."')");
+ }
+
+ $GLOBALS['phpgw_setup']->oProc->DropTable('fm_request_origin');
+ $GLOBALS['phpgw_setup']->oProc->DropTable('fm_project_origin');
+ $GLOBALS['phpgw_setup']->oProc->DropTable('fm_entity_origin');
+
+ $GLOBALS['setup_info']['property']['currentver'] = '0.9.17.501';
return $GLOBALS['setup_info']['property']['currentver'];
}
?>
====================================================
Index: property/setup/tables_current.inc.php
diff -u property/setup/tables_current.inc.php:1.22
property/setup/tables_current.inc.php:1.23
--- property/setup/tables_current.inc.php:1.22 Thu Feb 3 13:11:23 2005
+++ property/setup/tables_current.inc.php Tue Mar 1 15:04:27 2005
@@ -57,41 +57,7 @@
'ix' => array('location_code'),
'uc' => array()
),
-/* 'fm_meter' => array(
- 'fd' => array(
- 'id' => array('type' => 'auto','precision' =>
'4','nullable' => False),
- 'num' => array('type' => 'varchar','precision'
=> '20','nullable' => False),
- 'name' => array('type' => 'varchar','precision'
=> '20','nullable' => False),
- 'category' => array('type' => 'int','precision'
=> '4','nullable' => False),
- 'p_num' => array('type' =>
'varchar','precision' => '15','nullable' => True),
- 'p_entity_id' => array('type' =>
'int','precision' => '4','nullable' => True),
- 'p_cat_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
- 'location_code' => array('type' =>
'varchar','precision' => '20','nullable' => False),
- 'loc1' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
- 'loc2' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
- 'loc3' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
- 'loc4' => array('type' => 'varchar','precision'
=> '4','nullable' => True),
- 'address' => array('type' =>
'varchar','precision' => '150','nullable' => True),
- 'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True),
- 'user_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
- 'remark' => array('type' =>
'varchar','precision' => '255','nullable' => True)
- ),
- 'pk' => array('id','location_code'),
- 'fk' => array(),
- 'ix' => array('location_code'),
- 'uc' => array('num')
- ),
- 'fm_meter_category' => array(
- 'fd' => array(
- 'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
- 'descr' => array('type' =>
'varchar','precision' => '255','nullable' => False)
- ),
- 'pk' => array('id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- ),
-*/ 'fm_streetaddress' => array(
+ 'fm_streetaddress' => array(
'fd' => array(
'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
'descr' => array('type' =>
'varchar','precision' => '150','nullable' => False)
@@ -890,18 +856,6 @@
'ix' => array(),
'uc' => array()
),
- 'fm_request_origin' => array(
- 'fd' => array(
- 'origin' => array('type' =>
'varchar','precision' => '10','nullable' => False),
- 'origin_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'request_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True)
- ),
- 'pk' => array('origin','origin_id','request_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- ),
'fm_ns3420' => array(
'fd' => array(
'id' => array('type' => 'varchar','precision'
=> '20','nullable' => False),
@@ -1257,18 +1211,6 @@
'ix' => array('location_code'),
'uc' => array()
),
- 'fm_project_origin' => array(
- 'fd' => array(
- 'origin' => array('type' =>
'varchar','precision' => '10','nullable' => False),
- 'origin_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'project_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True)
- ),
- 'pk' => array('origin','origin_id','project_id'),
- 'fk' => array(),
- 'ix' => array(),
- 'uc' => array()
- ),
'fm_event_receipt' => array(
'fd' => array(
'cal_id' => array('type' => 'int','precision'
=> '4','nullable' => False),
@@ -1639,16 +1581,16 @@
'ix' => array(),
'uc' => array()
),
- 'fm_entity_origin' => array(
+ 'fm_origin' => array(
'fd' => array(
- 'origin' => array('type' =>
'varchar','precision' => '10','nullable' => False),
+ 'origin' => array('type' =>
'varchar','precision' => '12','nullable' => False),
'origin_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'entity_id' => array('type' =>
'int','precision' => '4','nullable' => False),
- 'cat_id' => array('type' => 'int','precision'
=> '4','nullable' => False),
- 'id' => array('type' => 'int','precision' =>
'4','nullable' => False),
+ 'destination' => array('type' =>
'varchar','precision' => '12','nullable' => False),
+ 'destination_id' => array('type' =>
'int','precision' => '4','nullable' => False),
+ 'user_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True)
),
- 'pk' =>
array('origin','origin_id','entity_id','cat_id','id'),
+ 'pk' =>
array('origin','origin_id','destination','destination_id'),
'fk' => array(),
'ix' => array(),
'uc' => array()
====================================================
Index: property/setup/setup.inc.php
diff -u property/setup/setup.inc.php:1.10 property/setup/setup.inc.php:1.11
--- property/setup/setup.inc.php:1.10 Sat Jan 29 13:23:25 2005
+++ property/setup/setup.inc.php Tue Mar 1 15:04:27 2005
@@ -24,7 +24,7 @@
$setup_info['property']['name'] = 'property';
$setup_info['property']['title'] = 'Property';
- $setup_info['property']['version'] = '0.9.17.500';
+ $setup_info['property']['version'] = '0.9.17.501';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
@@ -106,8 +106,6 @@
'fm_location_attrib',
'fm_location_choice',
'fm_location_config',
-// 'fm_meter',
-// 'fm_meter_category',
'fm_building_part',
'fm_drawing',
'fm_drawing_status',
@@ -135,7 +133,6 @@
'fm_request_status',
'fm_request_category',
'fm_request_history',
- 'fm_request_origin',
'fm_template',
'fm_template_hours',
'fm_chapter',
@@ -143,7 +140,6 @@
'fm_project',
'fm_projectbranch',
'fm_project_history',
- 'fm_project_origin',
'fm_tts_tickets',
'fm_tts_category',
'fm_tts_history',
@@ -180,7 +176,6 @@
'fm_entity_category',
'fm_entity_choice',
'fm_entity_lookup',
- 'fm_entity_origin',
'fm_entity_1_1',
'fm_entity_1_2',
'fm_entity_1_3',
@@ -196,7 +191,8 @@
'fm_s_agreement_detail',
'fm_s_agreement_pricing',
'fm_async_method',
- 'fm_cron_log'
+ 'fm_cron_log',
+ 'fm_origin'
);
/* The hooks this app includes, needed for hooks registration */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/setup tables_update.inc.php, 1.4 tables_current.inc.php, 1.23 setup.inc.php, 1.11,
sigurdne <=