migrations/Version20171110130247.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add comments for MEDIA + !!!! add "salt" for passwords !!!!
*/
class Version20171110130247 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 media.scenario_id IS \'Scenario\'');
$this->addSql('COMMENT ON COLUMN media.node_id IS \'Node\'');
$this->addSql('COMMENT ON COLUMN media.link_id IS \'Link\'');
$this->addSql('COMMENT ON COLUMN media.mcq_id IS \'MCQ\'');
$this->addSql('COMMENT ON COLUMN media.node_priority IS \'Priority in node\'');
$this->addSql('COMMENT ON COLUMN media.active IS \'Active (0 - off, 1 - on)\'');
$this->addSql('COMMENT ON COLUMN media.is_deleted IS \'Deleted?\'');
$this->addSql('COMMENT ON COLUMN media.created_at IS \'Created at\'');
$this->addSql('ALTER TABLE users ALTER salt SET DEFAULT \'tmpSolution\'');
}
/**
* @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 media.scenario_id IS NULL');
$this->addSql('COMMENT ON COLUMN media.node_id IS NULL');
$this->addSql('COMMENT ON COLUMN media.link_id IS NULL');
$this->addSql('COMMENT ON COLUMN media.mcq_id IS NULL');
$this->addSql('COMMENT ON COLUMN media.node_priority IS NULL');
$this->addSql('COMMENT ON COLUMN media.active IS NULL');
$this->addSql('COMMENT ON COLUMN media.is_deleted IS NULL');
$this->addSql('COMMENT ON COLUMN media.created_at IS NULL');
$this->addSql('ALTER TABLE users ALTER salt DROP DEFAULT');
}
}