[pLog-svn] r3166 - in plog/trunk: . class/database/pdb/datadict
class/database/pdb/drivers
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri Mar 31 02:51:37 GMT 2006
Author: mark
Date: 2006-03-31 02:51:36 +0000 (Fri, 31 Mar 2006)
New Revision: 3166
Modified:
plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php
plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php
plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php
plog/trunk/wizard.php
Log:
I think we can install properly through the new installation wizard, I just fix the following:
1. Fix some missing variable in dict class to make the table option works
2. Fix a reference variable error in mysql driver
3. Change the createTable option in wizard.php to make it generate the table with TYPE=MyISAM
Modified: plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php
===================================================================
--- plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php 2006-03-30 18:58:06 UTC (rev 3165)
+++ plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php 2006-03-31 02:51:36 UTC (rev 3166)
@@ -704,7 +704,7 @@
if (isset($tableoptions[$this->upperName.'_CONSTRAINTS']))
$s .= "\n".$tableoptions[$this->upperName.'_CONSTRAINTS'];
- $s .= "\n)";
+ $s .= "\n) ";
if (isset($tableoptions[$this->upperName])) $s .= $tableoptions[$this->upperName];
$sql[] = $s;
Modified: plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php
===================================================================
--- plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php 2006-03-30 18:58:06 UTC (rev 3165)
+++ plog/trunk/class/database/pdb/drivers/pdbdriverbase.class.php 2006-03-31 02:51:36 UTC (rev 3166)
@@ -304,6 +304,7 @@
$class->dataProvider = $this;
$class->connection = &$this;
+ $class->upperName = strtoupper($driverName);
return( $class );
}
Modified: plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php
===================================================================
--- plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php 2006-03-30 18:58:06 UTC (rev 3165)
+++ plog/trunk/class/database/pdb/drivers/pdbmysqldriver.class.php 2006-03-31 02:51:36 UTC (rev 3166)
@@ -136,7 +136,7 @@
/**
* @see PDbDriverBase::getDriverDataDictionary()
*/
- function &getDriverDataDictionary()
+ function getDriverDataDictionary()
{
return( PDbDriverBase::getDriverDataDictionary( 'mysql' ));
}
Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php 2006-03-30 18:58:06 UTC (rev 3165)
+++ plog/trunk/wizard.php 2006-03-31 02:51:36 UTC (rev 3166)
@@ -635,6 +635,7 @@
global $Inserts;
$createDb = $this->_request->getValue( "createDatabase" );
+ $message = '';
// only check for errors in case the database table should already exist!
if( !$createDb ) {
@@ -697,11 +698,11 @@
// create a data dictionary to give us the right sql code needed to create the tables
$dict = NewDataDictionary( $this->_db );
- // create the tables
+ // create the tables
$errors = false;
foreach( $Tables as $name => $table ) {
- $sqlarray = $dict->CreateTableSQL( $this->_dbPrefix.$name, $table );
+ $sqlarray = $dict->CreateTableSQL( $this->_dbPrefix.$name, $table, array( "MYSQL" => "TYPE=MyISAM" ) );
// each table may need more than one sql query because of indexes, triggers, etc...
$ok = true;
@@ -1113,6 +1114,10 @@
// generate the code with the changes for the table
$sqlarray = $dict->ChangeTableSQL( $this->_dbPrefix.$name, $table );
+ echo "===";
+ print_r($sqlarray);
+ echo "===";
+
//print("<hr/><pre>");
foreach( $sqlarray as $sql ) {
//print($sql."<br/>");
More information about the pLog-svn
mailing list