Created
August 2, 2013 20:37
-
-
Save shanestillwell/6143272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace DoctrineMigrations; | |
use Doctrine\DBAL\Migrations\AbstractMigration, | |
Doctrine\DBAL\Schema\Schema; | |
/** | |
* Add comments and collection_method to metricdata | |
*/ | |
class Version201308021451400 extends AbstractMigration | |
{ | |
public function up(Schema $schema) | |
{ | |
$sql =<<<EOF | |
ALTER TABLE `metricdata` | |
ADD `comments` VARCHAR(255) NULL AFTER `value`, | |
ADD `collection_method` VARCHAR(255) NULL AFTER `comments`; | |
EOF; | |
$this->addSql($sql); | |
} | |
public function down(Schema $schema) | |
{ | |
$sql =<<<EOF | |
ALTER TABLE `metricdata` | |
DROP `comments`, | |
DROP `collection_method`; | |
EOF; | |
$this->addSql($sql); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment