Update of /cvsroot/stack/stack-dev/install/update/updates
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv11860/install/update/updates
Modified Files:
Tag: STACK2_2
TwoPointTwo.php
Log Message:
Fixes for latest updating step.
Index: TwoPointTwo.php
===================================================================
RCS file: /cvsroot/stack/stack-dev/install/update/updates/Attic/TwoPointTwo.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** TwoPointTwo.php 29 Sep 2010 15:08:34 -0000 1.1.2.1
--- TwoPointTwo.php 29 Sep 2010 16:37:48 -0000 1.1.2.2
***************
*** 43,46 ****
--- 43,47 ----
{
// Add the new 'question_lines' table
+ global $config;
// below from adodbinit.php - expecting to be safer than simple mySQL query:
$db = NewADOConnection($config->getDB('dbType'));
***************
*** 64,68 ****
$conn->connect();
// hoping this is a platform-agnostic way to modify tables - more knowlegable opinions welcome!
! $conn->query('ALTER TABLE stackquestion ADD COLUMN line I(11) UNSIGNED');
// Create new line for each question, i.e. create row in question_lines and set line with that id.
--- 65,74 ----
$conn->connect();
// hoping this is a platform-agnostic way to modify tables - more knowlegable opinions welcome!
! //$conn->query('ALTER TABLE stackquestion ADD COLUMN line I(11) UNSIGNED'); // CANNOT DO THIS!
! $sqlarray = $dict->AddColumnSQL('stackquestion', 'line I(11) UNSIGNED');
! if(!$dict->ExecuteSQLArray($sqlarray))
! {
! $toReturn = $dict->ErrorMsg().'<br /><br />';
! }
// Create new line for each question, i.e. create row in question_lines and set line with that id.
|