migrations/Version20171110122953.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20171110122953 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.category IS \'Category (1 - picture, 2 - video...)\'');
$this->addSql('COMMENT ON COLUMN media.filename IS \'Filename\'');
$this->addSql('ALTER TABLE node ALTER scenario_id SET NOT NULL');
$this->addSql('COMMENT ON COLUMN node.scenario_id IS \'Scenario\'');
$this->addSql('COMMENT ON COLUMN node.title IS \'Title\'');
$this->addSql('COMMENT ON COLUMN node.description IS \'Description\'');
$this->addSql('COMMENT ON COLUMN node.links_order IS \'Order (0 - default, 1 - random)\'');
$this->addSql('COMMENT ON COLUMN node.parameters IS \'Parameters of patient (json)\'');
$this->addSql('COMMENT ON COLUMN node.priority IS \'Priority (0 - is last in order)\'');
$this->addSql('COMMENT ON COLUMN node.active IS \'Active (0 - off, 1 - on)\'');
$this->addSql('COMMENT ON COLUMN node.is_deleted IS \'Deleted?\'');
$this->addSql('COMMENT ON COLUMN node.created_at IS \'Created at\'');
$this->addSql('ALTER TABLE player_sessionhist DROP session_id');
$this->addSql('COMMENT ON COLUMN users.username IS \'Username\'');
$this->addSql('COMMENT ON COLUMN users.password IS \'Password\'');
$this->addSql('COMMENT ON COLUMN users.first_name IS \'First name\'');
$this->addSql('COMMENT ON COLUMN users.last_name IS \'Last name\'');
$this->addSql('COMMENT ON COLUMN users.email IS \'Email\'');
$this->addSql('COMMENT ON COLUMN users.phone IS \'Phone\'');
$this->addSql('COMMENT ON COLUMN users.institution IS \'Institution\'');
$this->addSql('COMMENT ON COLUMN users.address IS \'Address\'');
$this->addSql('COMMENT ON COLUMN users.city IS \'City\'');
$this->addSql('COMMENT ON COLUMN users.postalcode IS \'Postal code\'');
$this->addSql('COMMENT ON COLUMN users.settings IS \'Settings N/A\'');
$this->addSql('COMMENT ON COLUMN users.auth_modules IS \'Modules N/A\'');
$this->addSql('COMMENT ON COLUMN users.auth_role IS \'Role\'');
$this->addSql('COMMENT ON COLUMN users.created_at IS \'Created at\'');
$this->addSql('COMMENT ON COLUMN mcq.node_id IS \'Node\'');
$this->addSql('COMMENT ON COLUMN mcq.description IS \'Description\'');
$this->addSql('COMMENT ON COLUMN mcq.options IS \'Options (json)\'');
$this->addSql('COMMENT ON COLUMN mcq.active IS \'Active (0 - off, 1 - on)\'');
$this->addSql('COMMENT ON COLUMN mcq.is_deleted IS \'Deleted?\'');
$this->addSql('COMMENT ON COLUMN mcq.created_at IS \'Created at\'');
$this->addSql('COMMENT ON COLUMN link.node_id IS \'Node\'');
$this->addSql('COMMENT ON COLUMN link.description IS \'Description\'');
$this->addSql('COMMENT ON COLUMN link.feedback IS \'Feedback\'');
$this->addSql('COMMENT ON COLUMN link.score IS \'Score\'');
$this->addSql('COMMENT ON COLUMN link.preferred_order IS \'Preferred order:\'');
$this->addSql('COMMENT ON COLUMN link.correct IS \'Correct (-1 - fatal, 0 -wrong, 1 - correct)\'');
$this->addSql('COMMENT ON COLUMN link.active IS \'Active (0 - off, 1 - on)\'');
$this->addSql('COMMENT ON COLUMN link.is_deleted IS \'Deleted?\'');
$this->addSql('COMMENT ON COLUMN link.created_at IS \'Created at\'');
$this->addSql('COMMENT ON COLUMN scenario.users_id IS \'Creating/editing user\'');
$this->addSql('COMMENT ON COLUMN scenario.title IS \'Title\'');
$this->addSql('COMMENT ON COLUMN scenario.summary_intro IS \'Perex/annotation\'');
$this->addSql('COMMENT ON COLUMN scenario.summary_epilog IS \'Epilog summary\'');
$this->addSql('COMMENT ON COLUMN scenario.state IS \'State (0 - off, 1 - on)\'');
$this->addSql('COMMENT ON COLUMN scenario.is_deleted IS \'Deleted?\'');
$this->addSql('COMMENT ON COLUMN scenario.created_at IS \'Created at\'');
$this->addSql('COMMENT ON COLUMN scenario.lastmod_at IS NULL');
}
/**
* @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('ALTER TABLE player_sessionhist ADD session_id VARCHAR(64) DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN media.category IS NULL');
$this->addSql('COMMENT ON COLUMN media.filename IS NULL');
$this->addSql('COMMENT ON COLUMN users.username IS NULL');
$this->addSql('COMMENT ON COLUMN users.password IS NULL');
$this->addSql('COMMENT ON COLUMN users.first_name IS NULL');
$this->addSql('COMMENT ON COLUMN users.last_name IS NULL');
$this->addSql('COMMENT ON COLUMN users.email IS NULL');
$this->addSql('COMMENT ON COLUMN users.phone IS NULL');
$this->addSql('COMMENT ON COLUMN users.institution IS NULL');
$this->addSql('COMMENT ON COLUMN users.address IS NULL');
$this->addSql('COMMENT ON COLUMN users.city IS NULL');
$this->addSql('COMMENT ON COLUMN users.postalcode IS NULL');
$this->addSql('COMMENT ON COLUMN users.settings IS NULL');
$this->addSql('COMMENT ON COLUMN users.auth_modules IS NULL');
$this->addSql('COMMENT ON COLUMN users.auth_role IS NULL');
$this->addSql('COMMENT ON COLUMN users.created_at IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.node_id IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.description IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.options IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.active IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.is_deleted IS NULL');
$this->addSql('COMMENT ON COLUMN mcq.created_at IS NULL');
$this->addSql('COMMENT ON COLUMN link.node_id IS NULL');
$this->addSql('COMMENT ON COLUMN link.description IS NULL');
$this->addSql('COMMENT ON COLUMN link.feedback IS NULL');
$this->addSql('COMMENT ON COLUMN link.score IS NULL');
$this->addSql('COMMENT ON COLUMN link.preferred_order IS NULL');
$this->addSql('COMMENT ON COLUMN link.correct IS NULL');
$this->addSql('COMMENT ON COLUMN link.active IS NULL');
$this->addSql('COMMENT ON COLUMN link.is_deleted IS NULL');
$this->addSql('COMMENT ON COLUMN link.created_at IS NULL');
$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.state IS NULL');
$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\'');
$this->addSql('ALTER TABLE node ALTER scenario_id DROP NOT NULL');
$this->addSql('COMMENT ON COLUMN node.scenario_id IS NULL');
$this->addSql('COMMENT ON COLUMN node.title IS NULL');
$this->addSql('COMMENT ON COLUMN node.description IS NULL');
$this->addSql('COMMENT ON COLUMN node.links_order IS NULL');
$this->addSql('COMMENT ON COLUMN node.parameters IS NULL');
$this->addSql('COMMENT ON COLUMN node.priority IS NULL');
$this->addSql('COMMENT ON COLUMN node.active IS NULL');
$this->addSql('COMMENT ON COLUMN node.is_deleted IS NULL');
$this->addSql('COMMENT ON COLUMN node.created_at IS NULL');
}
}