Neos\Flow\Persistence\Doctrine\Migrations\Version20141113173712::up PHP Method

up() public method

public up ( Doctrine\DBAL\Schema\Schema $schema ) : void
$schema Doctrine\DBAL\Schema\Schema
return void
    public function up(Schema $schema)
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
        // skip execution of corresponding sql queries if migration has been applied already (see https://review.typo3.org/36299)
        $this->skipIf(array_key_exists('roleidentifiers', $this->sm->listTableColumns('typo3_flow_security_account')), 'Migration not needed, already applied earlier.');
        $this->addSql("ALTER TABLE typo3_flow_security_account ADD roleidentifiers LONGTEXT DEFAULT NULL COMMENT '(DC2Type:simple_array)'");
        $this->addSql("ALTER TABLE typo3_flow_security_account_roles_join DROP FOREIGN KEY FK_ADF11BBC23A1047C");
        $this->migrateAccountRolesUp();
        $this->addSql("ALTER TABLE typo3_flow_security_policy_role_parentroles_join DROP FOREIGN KEY FK_D459C58E6A8ABCDE");
        $this->addSql("ALTER TABLE typo3_flow_security_policy_role_parentroles_join DROP FOREIGN KEY FK_D459C58E23A1047C");
        $this->addSql("DROP TABLE typo3_flow_security_account_roles_join");
        $this->addSql("DROP TABLE typo3_flow_security_authorization_resource_securitypublis_861cb");
        $this->addSql("DROP TABLE typo3_flow_security_policy_role");
        $this->addSql("DROP TABLE typo3_flow_security_policy_role_parentroles_join");
    }