Neos\Flow\Persistence\Doctrine\Migrations\Version20130319131500::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() != "postgresql");
        $this->addSql("CREATE TABLE typo3_flow_security_account_roles_join (flow_security_account VARCHAR(40) NOT NULL, flow_policy_role VARCHAR(255) NOT NULL, PRIMARY KEY(flow_security_account, flow_policy_role))");
        $this->addSql("CREATE INDEX IDX_ADF11BBC58842EFC ON typo3_flow_security_account_roles_join (flow_security_account)");
        $this->addSql("CREATE INDEX IDX_ADF11BBC23A1047C ON typo3_flow_security_account_roles_join (flow_policy_role)");
        $this->addSql("CREATE TABLE typo3_flow_security_policy_role_parentroles_join (flow_policy_role VARCHAR(255) NOT NULL, parent_role VARCHAR(255) NOT NULL, PRIMARY KEY(flow_policy_role, parent_role))");
        $this->addSql("CREATE INDEX IDX_D459C58E23A1047C ON typo3_flow_security_policy_role_parentroles_join (flow_policy_role)");
        $this->addSql("CREATE INDEX IDX_D459C58E6A8ABCDE ON typo3_flow_security_policy_role_parentroles_join (parent_role)");
        $this->addSql("ALTER TABLE typo3_flow_security_account_roles_join ADD CONSTRAINT FK_ADF11BBC58842EFC FOREIGN KEY (flow_security_account) REFERENCES typo3_flow_security_account (persistence_object_identifier) NOT DEFERRABLE INITIALLY IMMEDIATE");
        $this->addSql("ALTER TABLE typo3_flow_security_account_roles_join ADD CONSTRAINT FK_ADF11BBC23A1047C FOREIGN KEY (flow_policy_role) REFERENCES typo3_flow_security_policy_role (identifier) NOT DEFERRABLE INITIALLY IMMEDIATE");
        $this->addSql("ALTER TABLE typo3_flow_security_policy_role_parentroles_join ADD CONSTRAINT FK_D459C58E23A1047C FOREIGN KEY (flow_policy_role) REFERENCES typo3_flow_security_policy_role (identifier) NOT DEFERRABLE INITIALLY IMMEDIATE");
        $this->addSql("ALTER TABLE typo3_flow_security_policy_role_parentroles_join ADD CONSTRAINT FK_D459C58E6A8ABCDE FOREIGN KEY (parent_role) REFERENCES typo3_flow_security_policy_role (identifier) NOT DEFERRABLE INITIALLY IMMEDIATE");
        $this->addSql("ALTER TABLE typo3_flow_security_policy_role ADD sourcehint VARCHAR(6) NOT NULL");
        $this->migrateAccountRolesUp();
        $this->addSql("ALTER TABLE typo3_flow_security_account DROP roles");
    }