Removed testing support for add (foreign) index
authorAlexander Ebert <ebert@woltlab.com>
Tue, 4 Dec 2012 23:29:43 +0000 (00:29 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 4 Dec 2012 23:29:43 +0000 (00:29 +0100)
wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php

index 6369baa505e1f528d75d42b1e9d39319f7387857..891f0f5d06df25e1c7481eb314f4b411b23912bd 100644 (file)
@@ -271,9 +271,6 @@ class PackageInstallationSQLParser extends SQLParser {
                        // log
                        $this->tableLog[] = array('tableName' => $tableName, 'packageID' => $this->package->packageID, 'action' => 'insert');
                        
-                       // add table to known tables
-                       $this->knownTables[$tableName] = $this->package->packageID;
-                       
                        // execute
                        parent::executeCreateTableStatement($tableName, $columns, $indices);
                }
@@ -324,12 +321,7 @@ class PackageInstallationSQLParser extends SQLParser {
         * @see wcf\system\database\util\SQLParser::executeAddIndexStatement()
         */
        protected function executeAddIndexStatement($tableName, $indexName, $indexData) {
-               if ($this->test) {
-                       if (!isset($this->knownTables[$tableName])) {
-                               throw new SystemException("Can not add index '".$indexName."' to table '.$tableName.'.");
-                       }
-               }
-               else {
+               if (!$this->test) {
                        // log
                        $this->indexLog[] = array('tableName' => $tableName, 'indexName' => $indexName, 'packageID' => $this->package->packageID, 'action' => 'insert');
                        
@@ -342,12 +334,7 @@ class PackageInstallationSQLParser extends SQLParser {
         * @see wcf\system\database\util\SQLParser::executeAddForeignKeyStatement()
         */
        protected function executeAddForeignKeyStatement($tableName, $indexName, $indexData) {
-               if ($this->test) {
-                       if (!isset($this->knownTables[$tableName])) {
-                               throw new SystemException("Can not add foreign key '".$indexName."' to table '.$tableName.'.");
-                       }
-               }
-               else {
+               if (!$this->test) {
                        // log
                        $this->indexLog[] = array('tableName' => $tableName, 'indexName' => $indexName, 'packageID' => $this->package->packageID, 'action' => 'insert');