Neos\Flow\Persistence\Doctrine\Migrations\Version20121002120817::up PHP Метод

up() публичный Метод

public up ( Doctrine\DBAL\Schema\Schema $schema ) : void
$schema Doctrine\DBAL\Schema\Schema
Результат void
    public function up(Schema $schema)
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "postgresql");
        // collect foreign keys pointing to "our" tables
        $tableNames = array('typo3_typo3cr_migration_domain_model_migrationstatus', 'typo3_typo3cr_domain_model_contentobjectproxy', 'typo3_typo3cr_domain_model_node', 'typo3_typo3cr_domain_model_workspace');
        $foreignKeyHandlingSql = Service::getForeignKeyHandlingSql($schema, $this->platform, $tableNames, 'flow3_persistence_identifier', 'persistence_object_identifier');
        // drop FK constraints
        foreach ($foreignKeyHandlingSql['drop'] as $sql) {
            $this->addSql($sql);
        }
        // rename identifier fields
        $this->addSql("ALTER TABLE typo3_typo3cr_migration_domain_model_migrationstatus RENAME COLUMN flow3_persistence_identifier TO persistence_object_identifier");
        $this->addSql("ALTER TABLE typo3_typo3cr_domain_model_contentobjectproxy RENAME COLUMN flow3_persistence_identifier TO persistence_object_identifier");
        $this->addSql("ALTER TABLE typo3_typo3cr_domain_model_node RENAME COLUMN flow3_persistence_identifier TO persistence_object_identifier");
        $this->addSql("ALTER TABLE typo3_typo3cr_domain_model_workspace RENAME COLUMN flow3_persistence_identifier TO persistence_object_identifier");
        // add back FK constraints
        foreach ($foreignKeyHandlingSql['add'] as $sql) {
            $this->addSql($sql);
        }
    }
Version20121002120817