Skip to content

Commit

Permalink
add migration class
Browse files Browse the repository at this point in the history
  • Loading branch information
cordoval authored and Evgeniy Guseletov committed Aug 7, 2012
1 parent c08ef2e commit 4d0f843
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions app/DoctrineMigrations/Version20120630111620.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;

/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20120630111620 extends AbstractMigration
{
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("ALTER TABLE bundle ADD nbRecommenders INT NOT NULL");
}

public function down(Schema $schema)
{
// this down() migration is autogenerated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");

$this->addSql("ALTER TABLE bundle DROP nbRecommenders");
}
}

0 comments on commit 4d0f843

Please sign in to comment.