Application\Migrations\Version20121010101749::up PHP Method

up() public method

public up ( Doctrine\DBAL\Schema\Schema $schema )
$schema Doctrine\DBAL\Schema\Schema
    public function up(Schema $schema)
    {
        // this up() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
        $this->addSql("CREATE TABLE activities (id INT AUTO_INCREMENT NOT NULL, bundle_id INT DEFAULT NULL, developer_id INT DEFAULT NULL, type INT NOT NULL, state INT NOT NULL, createdAt DATETIME NOT NULL, message VARCHAR(255) DEFAULT NULL, author VARCHAR(255) DEFAULT NULL, bundleName VARCHAR(255) DEFAULT NULL, bundleOwnerName VARCHAR(255) DEFAULT NULL, INDEX IDX_B5F1AFE5F1FAD9D3 (bundle_id), INDEX IDX_B5F1AFE564DD9267 (developer_id), INDEX type_state (type, state), INDEX created_at (createdAt), PRIMARY KEY(id)) ENGINE = InnoDB");
        $this->addSql("ALTER TABLE activities ADD CONSTRAINT FK_B5F1AFE5F1FAD9D3 FOREIGN KEY (bundle_id) REFERENCES bundle (id)");
        $this->addSql("ALTER TABLE activities ADD CONSTRAINT FK_B5F1AFE564DD9267 FOREIGN KEY (developer_id) REFERENCES owner (id)");
        $this->addSql("ALTER TABLE owner ADD lastCommitAt DATE DEFAULT NULL");
        $this->addSql("ALTER TABLE bundle DROP lastCommits, DROP tags");
    }
Version20121010101749