[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: inv/setup tables_update.inc.php,1.19,1.20
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: inv/setup tables_update.inc.php,1.19,1.20 |
Date: |
Fri, 16 May 2003 18:50:08 -0400 |
Update of /cvsroot/phpgroupware/inv/setup
In directory subversions:/tmp/cvs-serv13715
Modified Files:
tables_update.inc.php
Log Message:
update globals
Index: tables_update.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/inv/setup/tables_update.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** tables_update.inc.php 14 May 2002 22:11:28 -0000 1.19
--- tables_update.inc.php 16 May 2003 22:50:03 -0000 1.20
***************
*** 16,22 ****
function inv_table_exists($table)
{
! global $phpgw_setup,$all_tables,$DEBUG;
!
! $tablenames = $phpgw_setup->db->table_names();
while(list($key,$val) = @each($tablenames))
{
--- 16,20 ----
function inv_table_exists($table)
{
! $tablenames = $GLOBALS['phpgw_setup']->db->table_names();
while(list($key,$val) = @each($tablenames))
{
***************
*** 25,34 ****
if(in_array($table,$all_tables))
{
! if ($DEBUG) { echo '<br>' . $table . ' exists.'; }
return True;
}
else
{
! if ($DEBUG) { echo '<br>' . $table . ' does not
exist.'; }
return False;
}
--- 23,32 ----
if(in_array($table,$all_tables))
{
! if ($GLOBALS['DEBUG']) { echo '<br>' . $table . '
exists.'; }
return True;
}
else
{
! if ($GLOBALS['DEBUG']) { echo '<br>' . $table . ' does
not exist.'; }
return False;
}
***************
*** 37,58 ****
function inv_table_column($table,$column)
{
! global $phpgw_setup,$DEBUG;
!
! $phpgw_setup->db->HaltOnError = False;
! $phpgw_setup->db->query("SELECT COUNT($column) FROM $table");
! $phpgw_setup->db->next_record();
! if (!$phpgw_setup->db->f(0))
{
! if ($DEBUG) { echo '<br>' . $table . ' has no column
named ' . $column; }
return False;
}
! if ($DEBUG) { echo '<br>' . $table . ' has a column named ' .
$column; }
return True;
}
! if ($setup_info['inv']['currentver'] == '')
{
! $setup_info['inv']['currentver'] == '0.0.0';
}
--- 35,54 ----
function inv_table_column($table,$column)
{
! $GLOBALS['phpgw_setup']->db->HaltOnError = False;
! $GLOBALS['phpgw_setup']->db->query("SELECT COUNT($column) FROM
$table");
! $GLOBALS['phpgw_setup']->db->next_record();
! if (!$GLOBALS['phpgw_setup']->db->f(0))
{
! if ($GLOBALS['DEBUG']) { echo '<br>' . $table . ' has
no column named ' . $column; }
return False;
}
! if ($GLOBALS['DEBUG']) { echo '<br>' . $table . ' has a column
named ' . $column; }
return True;
}
! if ($GLOBALS['setup_info']['inv']['currentver'] == '')
{
! $GLOBALS['setup_info']['inv']['currentver'] == '0.0.0';
}
***************
*** 140,150 ****
function inv_upgrade0_8_1_001()
{
! global $setup_info, $phpgw_setup;
!
!
$phpgw_setup->oProc->AddColumn('inv_categorys','tax',array('type' =>
'decimal','precision' => 6,'scale' => 2,'nullable' => True));
! $setup_info['inv']['currentver'] = '0.8.1.002';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 136,143 ----
function inv_upgrade0_8_1_001()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('inv_categorys','tax',array('type' =>
'decimal','precision' => 6,'scale' => 2,'nullable' => True));
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.002';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 152,158 ****
function inv_upgrade0_8_1_002()
{
! global $setup_info,$phpgw_setup;
!
! $phpgw_setup->oProc->CreateTable(
'inv_orders', array(
'fd' => array(
--- 145,149 ----
function inv_upgrade0_8_1_002()
{
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_orders', array(
'fd' => array(
***************
*** 181,187 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.003';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 172,177 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.003';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 189,195 ****
function inv_upgrade0_8_1_003()
{
! global $setup_info,$phpgw_setup;
!
! $phpgw_setup->oProc->CreateTable(
'inv_delivery', array(
'fd' => array(
--- 179,183 ----
function inv_upgrade0_8_1_003()
{
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_delivery', array(
'fd' => array(
***************
*** 206,212 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.004';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 194,199 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.004';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 214,222 ****
function inv_upgrade0_8_1_004()
{
! global $setup_info,$phpgw_setup;
!
$phpgw_setup->oProc->AddColumn('inv_orderpos','tax',array('type' =>
'decimal','precision' => 6,'scale' => 2,'default' => 0,'nullable' => True));
!
! $phpgw_setup->oProc->CreateTable(
'inv_invoice', array(
'fd' => array(
--- 201,207 ----
function inv_upgrade0_8_1_004()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('inv_orderpos','tax',array('type' =>
'decimal','precision' => 6,'scale' => 2,'default' => 0,'nullable' => True));
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_invoice', array(
'fd' => array(
***************
*** 234,240 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.005';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 219,224 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.005';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 242,248 ****
function inv_upgrade0_8_1_005()
{
! global $setup_info,$phpgw_setup;
!
! $phpgw_setup->oProc->CreateTable(
'inv_deliverypos', array(
'fd' => array(
--- 226,230 ----
function inv_upgrade0_8_1_005()
{
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_deliverypos', array(
'fd' => array(
***************
*** 258,264 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.006';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 240,245 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.006';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 266,272 ****
function inv_upgrade0_8_1_006()
{
! global $setup_info,$phpgw_setup;
!
! $phpgw_setup->oProc->CreateTable(
'inv_invoicepos', array(
'fd' => array(
--- 247,251 ----
function inv_upgrade0_8_1_006()
{
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_invoicepos', array(
'fd' => array(
***************
*** 282,288 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.007';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 261,266 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.007';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 290,296 ****
function inv_upgrade0_8_1_007()
{
! global $setup_info,$phpgw_setup;
!
! $phpgw_setup->oProc->CreateTable(
'inv_invoicepos', array(
'fd' => array(
--- 268,272 ----
function inv_upgrade0_8_1_007()
{
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'inv_invoicepos', array(
'fd' => array(
***************
*** 306,312 ****
);
! $setup_info['inv']['currentver'] = '0.8.1.008';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 282,287 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.008';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 314,327 ****
function inv_upgrade0_8_1_008()
{
! global $setup_info,$phpgw_setup;
!
$phpgw_setup->oProc->AlterColumn('inv_products','category',array('type' =>
'varchar','precision' => 3,'nullable' => True));
!
$phpgw_setup->oProc->AddColumn('inv_categorys','level',array('type' =>
'int','precision' => 3,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AddColumn('inv_categorys','par_cat',array('type' =>
'varchar','precision' => 3,'nullable' => True));
!
$phpgw_setup->oProc->AddColumn('inv_categorys','main_cat',array('type' =>
'varchar','precision' => 3,'nullable' => True));
!
! $setup_info['inv']['currentver'] = '0.8.1.009';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 289,299 ----
function inv_upgrade0_8_1_008()
{
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('inv_products','category',array('type'
=> 'varchar','precision' => 3,'nullable' => True));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('inv_categorys','level',array('type'
=> 'int','precision' => 3,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('inv_categorys','par_cat',array('type'
=> 'varchar','precision' => 3,'nullable' => True));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('inv_categorys','main_cat',array('type'
=> 'varchar','precision' => 3,'nullable' => True));
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.1.009';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 329,348 ****
function inv_upgrade0_8_1_009()
{
! global $setup_info,$phpgw_setup;
!
$phpgw_setup->oProc->RenameTable('inv_products','phpgw_inv_products');
! $phpgw_setup->oProc->RenameTable('inv_dist','phpgw_inv_dist');
!
$phpgw_setup->oProc->RenameTable('inv_categorys','phpgw_inv_categorys');
!
$phpgw_setup->oProc->RenameTable('inv_status_list','phpgw_inv_statuslist');
!
$phpgw_setup->oProc->RenameTable('inv_orders','phpgw_inv_orders');
!
$phpgw_setup->oProc->RenameTable('inv_orderpos','phpgw_inv_orderpos');
!
$phpgw_setup->oProc->RenameTable('inv_delivery','phpgw_inv_delivery');
!
$phpgw_setup->oProc->RenameTable('inv_deliverypos','phpgw_inv_deliverypos');
!
$phpgw_setup->oProc->RenameTable('inv_invoice','phpgw_inv_invoice');
!
$phpgw_setup->oProc->RenameTable('inv_invoicepos','phpgw_inv_invoicepos');
!
! $setup_info['inv']['currentver'] = '0.8.2';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 301,317 ----
function inv_upgrade0_8_1_009()
{
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_products','phpgw_inv_products');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_dist','phpgw_inv_dist');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_categorys','phpgw_inv_categorys');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_status_list','phpgw_inv_statuslist');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_orders','phpgw_inv_orders');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_orderpos','phpgw_inv_orderpos');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_delivery','phpgw_inv_delivery');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_deliverypos','phpgw_inv_deliverypos');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_invoice','phpgw_inv_invoice');
!
$GLOBALS['phpgw_setup']->oProc->RenameTable('inv_invoicepos','phpgw_inv_invoicepos');
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.2';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 350,358 ****
function inv_upgrade0_8_2()
{
! global $setup_info,$phpgw_setup;
!
! $setup_info['inv']['currentver'] = '0.8.3';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 319,324 ----
function inv_upgrade0_8_2()
{
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 360,398 ****
function inv_upgrade0_8_3()
{
! global $setup_info,$phpgw_setup;
!
! $db = $phpgw_setup->db;
! $phpgw_setup->oProc->query("select * from phpgw_inv_categorys");
! if ($phpgw_setup->oProc->num_rows())
{
! while ($phpgw_setup->oProc->next_record())
{
$data = Array();
! $data['number'] =
$phpgw_setup->oProc->f('number');
! $data['tax'] = $phpgw_setup->oProc->f('tax');
$data = serialize($data);
! $db->query("select con as main from
phpgw_inv_categorys where number='" . $phpgw_setup->oProc->f('main_cat') . "'");
$db->next_record();
$cat_main = $db->f('main');
! $db->query("select con as parent from
phpgw_inv_categorys where number='" . $phpgw_setup->oProc->f('par_cat') . "'");
$db->next_record();
$cat_parent = $db->f('parent');
$db->query("INSERT into
phpgw_categories(cat_name,cat_appname,cat_owner,cat_access,cat_level,cat_parent,cat_main,cat_data)
values ('"
! . $phpgw_setup->oProc->f('name') .
"','inv',0,'public','" . $phpgw_setup->oProc->f('level') .
"','$cat_parent','$cat_main',$data)");
}
}
! $phpgw_setup->oProc->DropTable('phpgw_inv_categorys');
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_products','id',array('type' =>
'varchar','precision' => 11,'nullable' => True));
! $setup_info['inv']['currentver'] = '0.8.3.001';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 326,361 ----
function inv_upgrade0_8_3()
{
! $db = $GLOBALS['phpgw_setup']->db;
! $GLOBALS['phpgw_setup']->oProc->query("select * from
phpgw_inv_categorys");
! if ($GLOBALS['phpgw_setup']->oProc->num_rows())
{
! while ($GLOBALS['phpgw_setup']->oProc->next_record())
{
$data = Array();
! $data['number'] =
$GLOBALS['phpgw_setup']->oProc->f('number');
! $data['tax'] =
$GLOBALS['phpgw_setup']->oProc->f('tax');
$data = serialize($data);
! $db->query("select con as main from
phpgw_inv_categorys where number='" .
$GLOBALS['phpgw_setup']->oProc->f('main_cat') . "'");
$db->next_record();
$cat_main = $db->f('main');
! $db->query("select con as parent from
phpgw_inv_categorys where number='" .
$GLOBALS['phpgw_setup']->oProc->f('par_cat') . "'");
$db->next_record();
$cat_parent = $db->f('parent');
$db->query("INSERT into
phpgw_categories(cat_name,cat_appname,cat_owner,cat_access,cat_level,cat_parent,cat_main,cat_data)
values ('"
! .
$GLOBALS['phpgw_setup']->oProc->f('name') . "','inv',0,'public','" .
$GLOBALS['phpgw_setup']->oProc->f('level') .
"','$cat_parent','$cat_main',$data)");
}
}
!
$GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_inv_categorys');
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_products','id',array('type'
=> 'varchar','precision' => 11,'nullable' => True));
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.001';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 400,424 ****
function inv_upgrade0_8_3_001()
{
! global $setup_info,$phpgw_setup;
!
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_orders','owner',array('type' =>
'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_products','category',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_orderpos','order_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_orderpos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_deliverypos','delivery_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_deliverypos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_invoicepos','invoice_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_invoicepos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_invoice','order_id',array('type' =>
'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_delivery','order_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
! $setup_info['inv']['currentver'] = '0.8.3.002';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 363,384 ----
function inv_upgrade0_8_3_001()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_orders','owner',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_products','category',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_orderpos','order_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_orderpos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_deliverypos','delivery_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_deliverypos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_invoicepos','invoice_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_invoicepos','product_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_invoice','order_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_delivery','order_id',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.002';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 426,448 ****
function inv_upgrade0_8_3_002()
{
! global $setup_info,$phpgw_setup;
! $phpgw_setup->oProc->DropTable('phpgw_inv_dist');
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','date',array('type' =>
'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','serial',array('type' =>
'varchar','precision' => 64,'nullable' => False));
!
$phpgw_setup->oProc->RenameColumn('phpgw_inv_products','des','descr');
!
$phpgw_setup->oProc->AlterColumn('phpgw_inv_products','id',array('type' =>
'varchar','precision' => 20,'nullable' => False));
! $phpgw_setup->oProc->query("CREATE INDEX phpgw_inv_products_key
ON phpgw_inv_products(con,id)");
! $phpgw_setup->oProc->query("CREATE INDEX phpgw_inv_orders_key
ON phpgw_inv_orders(id,num)");
! $phpgw_setup->oProc->query("CREATE INDEX phpgw_inv_delivery_key
ON phpgw_inv_delivery(id,num)");
! $phpgw_setup->oProc->query("CREATE INDEX phpgw_inv_invoice_key
ON phpgw_inv_invoice(id,num)");
!
! $setup_info['inv']['currentver'] = '0.8.3.003';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 386,405 ----
function inv_upgrade0_8_3_002()
{
! $GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_inv_dist');
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','date',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','serial',array('type'
=> 'varchar','precision' => 64,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->RenameColumn('phpgw_inv_products','des','descr');
!
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_inv_products','id',array('type'
=> 'varchar','precision' => 20,'nullable' => False));
! $GLOBALS['phpgw_setup']->oProc->query("CREATE INDEX
phpgw_inv_products_key ON phpgw_inv_products(con,id)");
! $GLOBALS['phpgw_setup']->oProc->query("CREATE INDEX
phpgw_inv_orders_key ON phpgw_inv_orders(id,num)");
! $GLOBALS['phpgw_setup']->oProc->query("CREATE INDEX
phpgw_inv_delivery_key ON phpgw_inv_delivery(id,num)");
! $GLOBALS['phpgw_setup']->oProc->query("CREATE INDEX
phpgw_inv_invoice_key ON phpgw_inv_invoice(id,num)");
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.003';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 450,465 ****
function inv_upgrade0_8_3_003()
{
! global $setup_info,$phpgw_setup;
!
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','ftp',array('type' =>
'varchar','precision' => 255,'nullable' => False));
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','sdate',array('type' =>
'int','precision' => 4,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->RenameColumn('phpgw_inv_products','date','pdate');
! $phpgw_setup->oProc->query("insert into phpgw_inv_statuslist
(status_name) values ('saled')");
! $setup_info['inv']['currentver'] = '0.8.3.004';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 407,419 ----
function inv_upgrade0_8_3_003()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','ftp',array('type'
=> 'varchar','precision' => 255,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','sdate',array('type'
=> 'int','precision' => 4,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->RenameColumn('phpgw_inv_products','date','pdate');
! $GLOBALS['phpgw_setup']->oProc->query("insert into
phpgw_inv_statuslist (status_name) values ('saled')");
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.004';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 467,479 ****
function inv_upgrade0_8_3_004()
{
! global $setup_info,$phpgw_setup;
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_orders','status',array('type' =>
'varchar','precision' => 7,'default' => 'open','nullable' => False));
! $phpgw_setup->oProc->query("insert into phpgw_inv_statuslist
(status_name) values ('archive')");
!
! $setup_info['inv']['currentver'] = '0.8.3.005';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 421,430 ----
function inv_upgrade0_8_3_004()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_orders','status',array('type'
=> 'varchar','precision' => 7,'default' => 'open','nullable' => False));
! $GLOBALS['phpgw_setup']->oProc->query("insert into
phpgw_inv_statuslist (status_name) values ('archive')");
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.005';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 481,493 ****
function inv_upgrade0_8_3_005()
{
! global $setup_info,$phpgw_setup;
!
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_orders','access',array('type' =>
'varchar','precision' => 7,'nullable' => True));
! $phpgw_setup->oProc->query("insert into phpgw_inv_statuslist
(status_name) values ('archive')");
! $setup_info['inv']['currentver'] = '0.8.3.006';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 432,441 ----
function inv_upgrade0_8_3_005()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_orders','access',array('type'
=> 'varchar','precision' => 7,'nullable' => True));
! $GLOBALS['phpgw_setup']->oProc->query("insert into
phpgw_inv_statuslist (status_name) values ('archive')");
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.006';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 495,507 ****
function inv_upgrade0_8_3_006()
{
! global $setup_info,$phpgw_setup;
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','bin',array('type' =>
'int','precision' => 11,'default' => 0,'nullable' => False));
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_products','product_note',array('type'
=> 'text','nullable' => True));
! $phpgw_setup->oProc->query("DELETE from phpgw_inv_statuslist
where status_name='saled'");
! $phpgw_setup->oProc->query("INSERT into phpgw_inv_statuslist
(status_name) values ('sold')");
!
! $phpgw_setup->oProc->CreateTable(
'phpgw_inv_stockrooms', array(
'fd' => array(
--- 443,453 ----
function inv_upgrade0_8_3_006()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','bin',array('type'
=> 'int','precision' => 11,'default' => 0,'nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_products','product_note',array('type'
=> 'text','nullable' => True));
! $GLOBALS['phpgw_setup']->oProc->query("DELETE from
phpgw_inv_statuslist where status_name='saled'");
! $GLOBALS['phpgw_setup']->oProc->query("INSERT into
phpgw_inv_statuslist (status_name) values ('sold')");
! $GLOBALS['phpgw_setup']->oProc->CreateTable(
'phpgw_inv_stockrooms', array(
'fd' => array(
***************
*** 519,525 ****
);
! $setup_info['inv']['currentver'] = '0.8.3.007';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 465,470 ----
);
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.007';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 527,539 ****
function inv_upgrade0_8_3_007()
{
! global $setup_info,$phpgw_setup;
! $phpgw_setup->oProc->query("CREATE UNIQUE INDEX delivery_num ON
phpgw_inv_delivery(num)");
! $phpgw_setup->oProc->query("CREATE UNIQUE INDEX invoice_num ON
phpgw_inv_invoice(num)");
! $phpgw_setup->oProc->query("CREATE UNIQUE INDEX order_num ON
phpgw_inv_orders(num)");
!
! $setup_info['inv']['currentver'] = '0.8.3.008';
! return $setup_info['inv']['currentver'];
! //return True;
}
--- 472,481 ----
function inv_upgrade0_8_3_007()
{
! $GLOBALS['phpgw_setup']->oProc->query("CREATE UNIQUE INDEX
delivery_num ON phpgw_inv_delivery(num)");
! $GLOBALS['phpgw_setup']->oProc->query("CREATE UNIQUE INDEX
invoice_num ON phpgw_inv_invoice(num)");
! $GLOBALS['phpgw_setup']->oProc->query("CREATE UNIQUE INDEX
order_num ON phpgw_inv_orders(num)");
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.008';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
***************
*** 541,551 ****
function inv_upgrade0_8_3_008()
{
! global $setup_info,$phpgw_setup;
!
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_orderpos','dstatus',array('type' =>
'char','precision' => 4,'default' => 'open','nullable' => False));
!
$phpgw_setup->oProc->AddColumn('phpgw_inv_orderpos','istatus',array('type' =>
'char','precision' => 4,'default' => 'open','nullable' => False));
! $setup_info['inv']['currentver'] = '0.8.3.009';
! return $setup_info['inv']['currentver'];
}
--- 483,491 ----
function inv_upgrade0_8_3_008()
{
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_orderpos','dstatus',array('type'
=> 'char','precision' => 4,'default' => 'open','nullable' => False));
!
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_inv_orderpos','istatus',array('type'
=> 'char','precision' => 4,'default' => 'open','nullable' => False));
! $GLOBALS['setup_info']['inv']['currentver'] = '0.8.3.009';
! return $GLOBALS['setup_info']['inv']['currentver'];
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: inv/setup tables_update.inc.php,1.19,1.20,
Bettina Gille <address@hidden> <=