[pLog-svn] r2040 - plog/branches/plog-1.0.1
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun May 22 16:16:49 GMT 2005
Author: oscar
Date: 2005-05-22 16:16:48 +0000 (Sun, 22 May 2005)
New Revision: 2040
Modified:
plog/branches/plog-1.0.1/wizard.php
Log:
removed the "last_modification" column from the columns to upgrade/create since it was already there. Also, improved the error reporting when things go wrong (now it actually tells what the error message was)
Modified: plog/branches/plog-1.0.1/wizard.php
===================================================================
--- plog/branches/plog-1.0.1/wizard.php 2005-05-22 15:15:01 UTC (rev 2039)
+++ plog/branches/plog-1.0.1/wizard.php 2005-05-22 16:16:48 UTC (rev 2040)
@@ -511,7 +511,6 @@
"ALTER TABLE {dbprefix}mylinks ADD KEY category_id(category_id)");
$Changes["Links Categories"] = Array( "ALTER TABLE {dbprefix}mylinks_categories ADD COLUMN properties TEXT NOT NULL DEFAULT ''",
- "ALTER TABLE {dbprefix}mylinks_categories ADD COLUMN last_modification timestamp(14) NOT NULL",
"ALTER TABLE {dbprefix}mylinks_categories ADD KEY blog_id(blog_id)");
$Changes["Users"] = Array( "ALTER TABLE {dbprefix}users ADD COLUMN full_name VARCHAR(255) NOT NULL DEFAULT ''",
@@ -1409,19 +1408,21 @@
// ---
// make changes to the tables that need changes
// ---
- foreach( $Changes as $tableId => $changeTable) {
+ foreach( $Changes as $tableId => $changeTable) {
+ $errorMessage = "";
foreach( $changeTable as $changeCode ) {
// and run the query
$query = str_replace( "{dbprefix}", $this->_dbPrefix, $changeCode );
- if( !$this->_db->Execute( $query )) {
- $errors = true;
- }
+ if( !$this->_db->Execute( $query )) {
+ $errors = true;
+ $errorMessage .= $this->_db->ErrorMsg()."<br/>";
+ }
}
if( !$errors )
$message .= "Changes to table <strong>$tableId</strong> executed successfully.<br/>";
else {
- $message .= "Error modifying table $tableId: ".$this->_db->ErrorMsg()."<br/>";
+ $message .= "Error modifying table $tableId: ".$errorMessage;
}
}
More information about the pLog-svn
mailing list