From: Chuck Hagenbuch Date: Sun, 30 May 2010 01:35:41 +0000 (-0400) Subject: Revert addition of write_db directly to the Horde_Db_Adapter_Base object, along X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=88900ef70b3ad00e535e76477a09ca12ba810528;p=horde.git Revert addition of write_db directly to the Horde_Db_Adapter_Base object, along with executeWrite() which is unnecessary at this level. Revert "Add ability to define a write DB for use with split-DB installations" This reverts commit 0c369fee9b6ef70bdd92f1141635699d5ad9707b. Conflicts: framework/Core/lib/Horde/Core/Binder/Db.php framework/Db/lib/Horde/Db/Adapter/Base.php framework/Db/package.xml Revert "Add executeWrite()." These queries should always go to the write db This reverts commit 556ca7c259f179d69a1bace18224280720889acc. Conflicts: framework/Db/lib/Horde/Db/Adapter/Base.php remove executeWrite() calls from Oracle schema --- diff --git a/framework/Core/lib/Horde/Core/Binder/Db.php b/framework/Core/lib/Horde/Core/Binder/Db.php index a581eaf60..3a145031c 100644 --- a/framework/Core/lib/Horde/Core/Binder/Db.php +++ b/framework/Core/lib/Horde/Core/Binder/Db.php @@ -14,5 +14,4 @@ class Horde_Core_Binder_Db implements Horde_Injector_Binder { return false; } - } diff --git a/framework/Core/lib/Horde/Core/Factory/Db.php b/framework/Core/lib/Horde/Core/Factory/Db.php index 2cbf684f4..bedd70487 100644 --- a/framework/Core/lib/Horde/Core/Factory/Db.php +++ b/framework/Core/lib/Horde/Core/Factory/Db.php @@ -149,5 +149,4 @@ class Horde_Core_Factory_Db throw new Horde_Exception('Adapter class "' . $class . '" not found'); } - } diff --git a/framework/Db/lib/Horde/Db/Adapter/Base.php b/framework/Db/lib/Horde/Db/Adapter/Base.php index 8ff8af6b0..0b6b5de62 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Base.php +++ b/framework/Db/lib/Horde/Db/Adapter/Base.php @@ -100,13 +100,6 @@ abstract class Horde_Db_Adapter_Base */ protected $_schemaMethods = array(); - /** - * Write DB - * - * @var Horde_Db_Adapter_Base - */ - protected $_write; - /*########################################################################## # Construct/Destruct @@ -118,7 +111,6 @@ abstract class Horde_Db_Adapter_Base * @param array $config Configuration options and optional objects: *
      * 'charset' - (string) TODO
-     * 'write_db' - (Horde_Db_Adapter_Base) Use this DB for write operations.
      * 
*/ public function __construct($config) @@ -545,26 +537,6 @@ abstract class Horde_Db_Adapter_Base } /** - * Executes the SQL statement in the context of this connection. - * Uses the write DB if necessary. - * - * @param string $sql SQL statement. - * @param mixed $arg1 Either an array of bound parameters or a query - * name. - * @param string $arg2 If $arg1 contains bound parameters, the query - * name. - * - * @return Traversable - * @throws Horde_Db_Exception - */ - public function executeWrite($sql, $arg1 = null, $arg2 = null) - { - return $this->_write - ? $this->_write->execute($sql, $arg1, $arg2) - : $this->execute($sql, $arg1, $arg2); - } - - /** * Returns the last auto-generated ID from the affected table. * * @param string $sql SQL statement. @@ -582,10 +554,6 @@ abstract class Horde_Db_Adapter_Base public function insert($sql, $arg1 = null, $arg2 = null, $pk = null, $idValue = null, $sequenceName = null) { - if ($this->_write) { - return $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName); - } - $this->execute($sql, $arg1, $arg2); return isset($idValue) @@ -607,10 +575,6 @@ abstract class Horde_Db_Adapter_Base */ public function update($sql, $arg1 = null, $arg2 = null) { - if ($this->_write) { - return $this->_write->update($sql, $arg1, $arg2); - } - $this->execute($sql, $arg1, $arg2); return $this->_rowCount; } @@ -629,10 +593,6 @@ abstract class Horde_Db_Adapter_Base */ public function delete($sql, $arg1 = null, $arg2 = null) { - if ($this->_write) { - return $this->_write->delete($sql, $arg1, $arg2); - } - $this->execute($sql, $arg1, $arg2); return $this->_rowCount; } @@ -644,9 +604,7 @@ abstract class Horde_Db_Adapter_Base */ public function transactionStarted() { - return $this->_write - ? $this->_write->transactionStarted() - : $this->_transactionStarted; + return $this->_transactionStarted; } /** @@ -654,12 +612,8 @@ abstract class Horde_Db_Adapter_Base */ public function beginDbTransaction() { - if ($this->_write) { - $this->_write->beginDbTransaction(); - } elseif (!$this->_transactionStarted) { - $this->_transactionStarted = true; - $this->_connection->beginTransaction(); - } + $this->_transactionStarted = true; + $this->_connection->beginTransaction(); } /** @@ -667,12 +621,8 @@ abstract class Horde_Db_Adapter_Base */ public function commitDbTransaction() { - if ($this->_write) { - $this->_write->commitDbTransaction(); - } elseif ($this->_transactionStarted) { - $this->_connection->commit(); - $this->_transactionStarted = false; - } + $this->_connection->commit(); + $this->_transactionStarted = false; } /** @@ -681,12 +631,10 @@ abstract class Horde_Db_Adapter_Base */ public function rollbackDbTransaction() { - if ($this->_write) { - $this->_write->rollbackDbTransaction(); - } elseif ($this->_transactionStarted) { - $this->_connection->rollBack(); - $this->_transactionStarted = false; - } + if (! $this->_transactionStarted) { return; } + + $this->_connection->rollBack(); + $this->_transactionStarted = false; } /** @@ -748,10 +696,6 @@ abstract class Horde_Db_Adapter_Base */ public function insertFixture($fixture, $tableName) { - if ($this->_write) { - return $this->_write->insertFixture($fixture, $tableName); - } - /*@TODO*/ return $this->execute("INSERT INTO #{quote_table_name(table_name)} (#{fixture.key_list}) VALUES (#{fixture.value_list})", 'Fixture Insert'); } diff --git a/framework/Db/lib/Horde/Db/Adapter/Base/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Base/Schema.php index 932af89ba..db3066770 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Base/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Base/Schema.php @@ -420,7 +420,7 @@ abstract class Horde_Db_Adapter_Base_Schema $sql = "CREATE $temp TABLE ".$this->quoteTableName($tableDefinition->getName())." (\n". $tableDefinition->toSql()."\n". ") $opts"; - return $this->executeWrite($sql); + return $this->execute($sql); } /** @@ -441,7 +441,7 @@ abstract class Horde_Db_Adapter_Base_Schema public function dropTable($name) { $this->_clearTableCache($name); - return $this->executeWrite('DROP TABLE ' . $this->quoteTableName($name)); + return $this->execute('DROP TABLE ' . $this->quoteTableName($name)); } /** @@ -466,7 +466,7 @@ abstract class Horde_Db_Adapter_Base_Schema ' ADD '.$this->quoteColumnName($columnName) . ' '.$this->typeToSql($type, $limit, $precision, $scale, $unsigned); $sql = $this->addColumnOptions($sql, $options); - return $this->executeWrite($sql); + return $this->execute($sql); } /** @@ -482,7 +482,7 @@ abstract class Horde_Db_Adapter_Base_Schema $this->_clearTableCache($tableName); $sql = 'ALTER TABLE ' . $this->quoteTableName($tableName).' DROP '.$this->quoteColumnName($columnName); - return $this->executeWrite($sql); + return $this->execute($sql); } /** @@ -574,7 +574,7 @@ abstract class Horde_Db_Adapter_Base_Schema $quotedColumnNames = implode(', ', $quotedCols); $sql = "CREATE $indexType INDEX ".$this->quoteColumnName($indexName). 'ON '.$this->quoteTableName($tableName) . " ($quotedColumnNames)"; - return $this->executeWrite($sql); + return $this->execute($sql); } /** @@ -600,7 +600,7 @@ abstract class Horde_Db_Adapter_Base_Schema $index = $this->indexName($tableName, $options); $sql = "DROP INDEX ".$this->quoteColumnName($index).' ON ' . $this->quoteTableName($tableName); - return $this->executeWrite($sql); + return $this->execute($sql); } /** diff --git a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php index 4d34e81c8..24b3263ca 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php @@ -94,7 +94,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema */ public function createDatabase($name) { - return $this->executeWrite("CREATE DATABASE `$name`"); + return $this->execute("CREATE DATABASE `$name`"); } /** @@ -104,7 +104,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema */ public function dropDatabase($name) { - return $this->executeWrite("DROP DATABASE IF EXISTS `$name`"); + return $this->execute("DROP DATABASE IF EXISTS `$name`"); } /** @@ -275,7 +275,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema { $this->_clearTableCache($name); - return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($name).' RENAME '.$this->quoteTableName($newName)); + return $this->execute('ALTER TABLE '.$this->quoteTableName($name).' RENAME '.$this->quoteTableName($newName)); } /** @@ -297,7 +297,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema $default = $this->quote($default); $sql = "ALTER TABLE $quotedTableName CHANGE $quotedColumnName $quotedColumnName $currentType DEFAULT $default"; - return $this->executeWrite($sql); + return $this->execute($sql); } /** @@ -327,7 +327,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema $sql = "ALTER TABLE $quotedTableName CHANGE $quotedColumnName $quotedColumnName $typeSql"; $sql = $this->addColumnOptions($sql, $options); - $this->executeWrite($sql); + $this->execute($sql); } /** @@ -350,7 +350,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema $quotedColumnName.' '. $this->quoteColumnName($newColumnName)." ". $currentType; - return $this->executeWrite($sql); + return $this->execute($sql); } /** diff --git a/framework/Db/lib/Horde/Db/Adapter/Mysqli.php b/framework/Db/lib/Horde/Db/Adapter/Mysqli.php index 013f2fba3..cba44d165 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Mysqli.php +++ b/framework/Db/lib/Horde/Db/Adapter/Mysqli.php @@ -336,7 +336,7 @@ class Horde_Db_Adapter_Mysqli extends Horde_Db_Adapter_Base */ public function insert($sql, $arg1=null, $arg2=null, $pk=null, $idValue=null, $sequenceName=null) { - $this->executeWrite($sql, $arg1, $arg2); + $this->execute($sql, $arg1, $arg2); return isset($idValue) ? $idValue : $this->_insertId; } diff --git a/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php index f269d0b85..9f47bfe7f 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php @@ -77,8 +77,8 @@ class Horde_Db_Adapter_Oracle_Schema extends Horde_Db_Adapter_Base_Schema $trigger_name = $tableName . '_' . $columnName . '_trigger'; $this->beginDbTransaction(); - $this->executeWrite('CREATE SEQUENCE ' . $seq_name); - $this->executeWrite( + $this->execute('CREATE SEQUENCE ' . $seq_name); + $this->execute( 'CREATE TRIGGER ' . $trigger_name . ' ' . 'BEFORE INSERT ON ' . $this->quoteTableName($tableName) . ' ' . 'FOR EACH ROW ' diff --git a/framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php b/framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php index bd57ba29a..1eb51337f 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php +++ b/framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php @@ -226,7 +226,6 @@ abstract class Horde_Db_Adapter_Pdo_Base extends Horde_Db_Adapter_Base $dsnOpts['persistent'], $dsnOpts['charset'], $dsnOpts['phptype'], - $dsnOpts['write_db'] ); // return DSN and user/pass for connection @@ -235,5 +234,4 @@ abstract class Horde_Db_Adapter_Pdo_Base extends Horde_Db_Adapter_Base $this->_config['username'], $this->_config['password']); } - } diff --git a/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php b/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php index 256b98092..f05a26794 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php +++ b/framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php @@ -95,7 +95,6 @@ class Horde_Db_Adapter_Pdo_Mysql extends Horde_Db_Adapter_Pdo_Base $dsnOpts['adapter'], $dsnOpts['username'], $dsnOpts['password'], - $dsnOpts['write_db'] ); $dsnOpts = $this->_normalizeConfig($dsnOpts); @@ -117,5 +116,4 @@ class Horde_Db_Adapter_Pdo_Mysql extends Horde_Db_Adapter_Pdo_Base $this->_config['username'], $this->_config['password']); } - } diff --git a/framework/Db/lib/Horde/Db/Adapter/Pdo/Pgsql.php b/framework/Db/lib/Horde/Db/Adapter/Pdo/Pgsql.php index 15c6b2b31..4e35c573c 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Pdo/Pgsql.php +++ b/framework/Db/lib/Horde/Db/Adapter/Pdo/Pgsql.php @@ -141,10 +141,6 @@ class Horde_Db_Adapter_Pdo_Pgsql extends Horde_Db_Adapter_Pdo_Base public function insert($sql, $arg1 = null, $arg2 = null, $pk = null, $idValue = null, $sequenceName = null) { - if ($this->_write) { - return $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName); - } - // Extract the table from the insert sql. Yuck. $temp = explode(' ', $sql, 4); $table = str_replace('"', '', $temp[2]); @@ -254,5 +250,4 @@ class Horde_Db_Adapter_Pdo_Pgsql extends Horde_Db_Adapter_Pdo_Base { return (int)$this->selectValue('SELECT currval('.$this->quoteSequenceName($sequenceName).')'); } - } diff --git a/framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php index 7ca6940b5..4a585cdef 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php @@ -154,7 +154,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema } } - return $this->executeWrite('CREATE DATABASE ' . $this->quoteTableName($name) . $optionString); + return $this->execute('CREATE DATABASE ' . $this->quoteTableName($name) . $optionString); } /** @@ -166,10 +166,10 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema public function dropDatabase($name) { if ($this->postgresqlVersion() >= 80200) { - return $this->executeWrite('DROP DATABASE IF EXISTS ' . $this->quoteTableName($name)); + return $this->execute('DROP DATABASE IF EXISTS ' . $this->quoteTableName($name)); } else { try { - return $this->executeWrite('DROP DATABASE ' . $this->quoteTableName($name)); + return $this->execute('DROP DATABASE ' . $this->quoteTableName($name)); } catch (Horde_Db_Exception $e) { if ($this->_logger) { $this->_logger->warn("$name database doesn't exist"); } } @@ -430,7 +430,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema { $this->_clearTableCache($name); - return $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName)); + return $this->execute('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName)); } /** @@ -464,7 +464,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema } // Add the column. - $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($tableName) . ' ADD COLUMN ' . $this->quoteColumnName($columnName) . ' ' . $sqltype); + $this->execute('ALTER TABLE ' . $this->quoteTableName($tableName) . ' ADD COLUMN ' . $this->quoteColumnName($columnName) . ' ' . $sqltype); $default = isset($options['default']) ? $options['default'] : null; $notnull = isset($options['null']) && $options['null'] === false; @@ -493,7 +493,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema $quotedTableName = $this->quoteTableName($tableName); try { - $this->executeWrite('ALTER TABLE '.$quotedTableName.' ALTER COLUMN '.$this->quoteColumnName($columnName).' TYPE '.$this->typeToSql($type, $limit, $precision, $scale)); + $this->execute('ALTER TABLE '.$quotedTableName.' ALTER COLUMN '.$this->quoteColumnName($columnName).' TYPE '.$this->typeToSql($type, $limit, $precision, $scale)); } catch (Horde_Db_Exception $e) { // This is PostgreSQL 7.x, or the old type could not be coerced to // the new type, so we have to use a more arcane way of doing it. @@ -518,9 +518,9 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema $this->addColumn($tableName, $tmpColumnName, $type, $options); if ($oldType == 'boolean') { - $this->update('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST(CASE WHEN '.$this->quoteColumnName($columnName).' IS TRUE THEN 1 ELSE 0 END AS '.$this->typeToSql($type, $limit, $precision, $scale).')'); + $this->execute('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST(CASE WHEN '.$this->quoteColumnName($columnName).' IS TRUE THEN 1 ELSE 0 END AS '.$this->typeToSql($type, $limit, $precision, $scale).')'); } else { - $this->update('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST('.$this->quoteColumnName($columnName).' AS '.$this->typeToSql($type, $limit, $precision, $scale).')'); + $this->execute('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST('.$this->quoteColumnName($columnName).' AS '.$this->typeToSql($type, $limit, $precision, $scale).')'); } $this->removeColumn($tableName, $columnName); @@ -537,7 +537,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema if ($autoincrement) { $seq_name = $this->quoteSequenceName($this->defaultSequenceName($tableName, $columnName)); - $this->executeWrite('CREATE SEQUENCE ' . $seq_name); + $this->execute('CREATE SEQUENCE ' . $seq_name); $this->changeColumnDefault($tableName, $columnName, 'NEXTVAL(' . $seq_name . ')'); } elseif (array_key_exists('default', $options)) { $this->changeColumnDefault($tableName, $columnName, $default); @@ -554,16 +554,16 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema public function changeColumnDefault($tableName, $columnName, $default) { $this->_clearTableCache($tableName); - return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName). ' ALTER COLUMN '.$this->quoteColumnName($columnName).' SET DEFAULT '.$this->quote($default)); + return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName). ' ALTER COLUMN '.$this->quoteColumnName($columnName).' SET DEFAULT '.$this->quote($default)); } public function changeColumnNull($tableName, $columnName, $null, $default = null) { $this->_clearTableCache($tableName); if (!($null || is_null($default))) { - $this->update('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columnName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL'); + $this->execute('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columnName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL'); } - return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName).' ALTER '.$this->quoteColumnName($columnName).' '.($null ? 'DROP' : 'SET').' NOT NULL'); + return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName).' ALTER '.$this->quoteColumnName($columnName).' '.($null ? 'DROP' : 'SET').' NOT NULL'); } /** @@ -572,7 +572,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema public function renameColumn($tableName, $columnName, $newColumnName) { $this->_clearTableCache($tableName); - return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName).' RENAME COLUMN '.$this->quoteColumnName($columnName).' TO '.$this->quoteColumnName($newColumnName)); + return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName).' RENAME COLUMN '.$this->quoteColumnName($columnName).' TO '.$this->quoteColumnName($newColumnName)); } /** @@ -581,7 +581,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema public function removeIndex($tableName, $options = array()) { $this->_clearTableCache($tableName); - return $this->executeWrite('DROP INDEX '.$this->indexName($tableName, $options)); + return $this->execute('DROP INDEX '.$this->indexName($tableName, $options)); } /** diff --git a/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php b/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php index 76c5b2f52..76a1d797e 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php +++ b/framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php @@ -193,7 +193,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema { $this->_clearTableCache($name); - return $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName)); + return $this->execute('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName)); } /** @@ -216,7 +216,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema parent::addColumn($tableName, $columnName, $type, $options); // See last paragraph on http://www.sqlite.org/lang_altertable.html - $this->executeWrite('VACUUM'); + $this->execute('VACUUM'); } /** @@ -304,7 +304,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema $index = $this->indexName($tableName, $options); $sql = 'DROP INDEX '.$this->quoteColumnName($index); - return $this->executeWrite($sql); + return $this->execute($sql); } @@ -436,6 +436,6 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema $quotedFrom = $this->quoteTableName($from); $quotedFromColumns = implode(', ', array_map(array($this, 'quoteColumnName'), $fromColumns)); - $this->insert("INSERT INTO $quotedTo ($quotedToColumns) SELECT $quotedFromColumns FROM $quotedFrom"); + $this->execute("INSERT INTO $quotedTo ($quotedToColumns) SELECT $quotedFromColumns FROM $quotedFrom"); } } diff --git a/framework/Db/package.xml b/framework/Db/package.xml index ee6ac00fa..837919df1 100644 --- a/framework/Db/package.xml +++ b/framework/Db/package.xml @@ -31,7 +31,6 @@ http://pear.php.net/dtd/package-2.0.xsd"> BSD * Add support for adding autoincrement to a column. - * Add ability to define a write DB for use with split-DB installations. * Initial release