migrations/Version20171110094051.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add some comments into SCENARIO.
*/
class Version20171110094051 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('COMMENT ON COLUMN scenario.users_id IS \'id of creating/editing user\'');
$this->addSql('COMMENT ON COLUMN scenario.title IS \'Title of scenario\'');
$this->addSql('COMMENT ON COLUMN scenario.summary_intro IS \'First information about scenario\'');
$this->addSql('COMMENT ON COLUMN scenario.summary_epilog IS \'Information after completing scenario\'');
$this->addSql('COMMENT ON COLUMN scenario.is_deleted IS \'soft delete\'');
$this->addSql('COMMENT ON COLUMN scenario.created_at IS \'Created at: should be now\'');
$this->addSql('COMMENT ON COLUMN scenario.lastmod_at IS \'Last modified at: should be now\'');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
//$this->addSql('CREATE SCHEMA public');
$this->addSql('COMMENT ON COLUMN scenario.users_id IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.title IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.summary_intro IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.summary_epilog IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.is_deleted IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.created_at IS NULL');
$this->addSql('COMMENT ON COLUMN scenario.lastmod_at IS NULL');
}
}