migrations/Version20200408133916.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20200408133916 extends AbstractMigration
  10. {
  11.     public function getDescription() : string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema) : void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql''Migration can only be executed safely on \'postgresql\'.');
  19.         $this->addSql('ALTER TABLE channel_settings ADD mixing_time_point TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
  20.         $this->addSql('ALTER TABLE channel_settings ADD mixing_temperature DOUBLE PRECISION DEFAULT NULL');
  21.         $this->addSql('ALTER TABLE channel_settings ADD casting_time_point TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
  22.         $this->addSql('ALTER TABLE channel_settings ADD starting_time_point TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
  23.         $this->addSql('COMMENT ON COLUMN channel_settings.mixing_time_point IS \'Mixing time point.\'');
  24.         $this->addSql('COMMENT ON COLUMN channel_settings.mixing_temperature IS \'Mixing temperature\'');
  25.         $this->addSql('COMMENT ON COLUMN channel_settings.casting_time_point IS \'Casting time point.\'');
  26.         $this->addSql('COMMENT ON COLUMN channel_settings.starting_time_point IS \'Starting time point.\'');
  27.     }
  28.     public function down(Schema $schema) : void
  29.     {
  30.         // this down() migration is auto-generated, please modify it to your needs
  31.         $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql''Migration can only be executed safely on \'postgresql\'.');
  32.         $this->addSql('CREATE SCHEMA public');
  33.         $this->addSql('ALTER TABLE channel_settings DROP mixing_time_point');
  34.         $this->addSql('ALTER TABLE channel_settings DROP mixing_temperature');
  35.         $this->addSql('ALTER TABLE channel_settings DROP casting_time_point');
  36.         $this->addSql('ALTER TABLE channel_settings DROP starting_time_point');
  37.     }
  38. }