Neos\Flow\Persistence\Doctrine\Migrations\Version20121002120357::down PHP Method

down() public method

public down ( Doctrine\DBAL\Schema\Schema $schema ) : void
$schema Doctrine\DBAL\Schema\Schema
return void
    public function down(Schema $schema)
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "postgresql");
        // collect foreign keys pointing to "our" tables
        $foreignKeyHandlingSql = Service::getForeignKeyHandlingSql($schema, $this->platform, array('typo3_media_domain_model_image'), 'persistence_object_identifier', 'flow3_persistence_identifier');
        // drop FK constraints
        foreach ($foreignKeyHandlingSql['drop'] as $sql) {
            $this->addSql($sql);
        }
        // rename identifier fields
        $this->addSql("ALTER TABLE typo3_media_domain_model_image RENAME COLUMN persistence_object_identifier TO flow3_persistence_identifier");
        // add back FK constraints
        foreach ($foreignKeyHandlingSql['add'] as $sql) {
            $this->addSql($sql);
        }
    }
Version20121002120357