kekrozsak/app/DoctrineMigrations/Version20120829193604.php
Polonkai Gergely faf99b627e Added a draft flag to the News Entity
Solves issue #11

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
2012-08-29 19:36:55 +02:00

29 lines
835 B
PHP

<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20120829193604 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 news ADD draft TINYINT(1) 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 news DROP draft");
}
}