cvs: pear /MDB/MDB Manager.php
| From: | Lukas Smith | Date: | Sun, 02 Feb 2003 13:42:12 +0000 |
| Subject: | cvs: pear /MDB/MDB Manager.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8676@lists.php.net to get a copy of this message | ||
lsmith Sun Feb 2 08:42:12 2003 EDT
Modified files:
/pear/MDB/MDB Manager.php
Log:
cosmetic fixes
commented out listDatabases call in updateDatabase until all drivers have implemented this method
Index: pear/MDB/MDB/Manager.php
diff -u pear/MDB/MDB/Manager.php:1.69 pear/MDB/MDB/Manager.php:1.70
--- pear/MDB/MDB/Manager.php:1.69 Sun Jan 19 06:13:35 2003
+++ pear/MDB/MDB/Manager.php Sun Feb 2 08:42:12 2003
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Manager.php,v 1.69 2003/01/19 11:13:35 lsmith Exp $
+// $Id: Manager.php,v 1.70 2003/02/02 13:42:12 lsmith Exp $
//
require_once('MDB/Parser.php');
@@ -327,7 +327,7 @@
{
$this->expectError(MDB_ERROR_ALREADY_EXISTS);
$result = $this->database->createTable($table_name, $table['FIELDS']);
- $this->popExpect(MDB_ERROR_ALREADY_EXISTS);
+ $this->popExpect();
if (MDB::isError($result)) {
if($result->getCode() === MDB_ERROR_ALREADY_EXISTS) {
$this->warnings[] = 'Table already exists: '.$table_name;
@@ -463,7 +463,7 @@
foreach($table['INDEXES'] as $index_name => $index) {
$this->expectError(MDB_ERROR_ALREADY_EXISTS);
$result = $this->database->createIndex($table_name, $index_name, $index);
- $this->popExpect(MDB_ERROR_ALREADY_EXISTS);
+ $this->popExpect();
if (MDB::isError($result)) {
if($result->getCode() === MDB_ERROR_ALREADY_EXISTS) {
$this->warnings[] = 'Index already exists: '.$index_name;
@@ -559,7 +559,7 @@
$this->expectError(MDB_ERROR_ALREADY_EXISTS);
$result = $this->database->createSequence($sequence_name, $start);
- $this->popExpect(MDB_ERROR_ALREADY_EXISTS);
+ $this->popExpect();
if (MDB::isError($result)) {
if($result->getCode() === MDB_ERROR_ALREADY_EXISTS) {
$this->warnings[] = 'Sequence already exists: '.$sequence_name;
@@ -634,7 +634,7 @@
$this->database->debug('Create database:
'.$this->database_definition['name']);
$this->expectError(MDB_ERROR_ALREADY_EXISTS);
$result =
$this->database->createDatabase($this->database_definition['name']);
- $this->popExpect(MDB_ERROR_ALREADY_EXISTS);
+ $this->popExpect();
if (MDB::isError($result)) {
if($result->getCode() === MDB_ERROR_ALREADY_EXISTS) {
$this->warnings[] = 'Database already exists:
'.$this->database_definition['name'];
@@ -2089,13 +2089,16 @@
}
$this->database_definition = $database_definition;
$copy = 0;
+/*
$databases = $this->database->listDatabases();
if (MDB::isError($databases)) {
return($this->raiseError(MDB_ERROR_MANAGER, NULL, NULL,
- 'Could not verify if database allready exists'));
+ 'Could not verify if database allready exists:
'.$databases->getUserinfo()));
}
if (is_array($databases) &&
in_array($this->database_definition['name'], $databases)
&& $previous_schema_file && file_exists($previous_schema_file))
+*/
+ if ($previous_schema_file && file_exists($previous_schema_file))
{
$previous_definition = $this->parseDatabaseDefinitionFile($previous_schema_file,
$variables, 0);
if (MDB::isError($previous_definition)) {