migrations/Version20190405215905.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 Version20190405215905 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() !== 'mysql''Migration can only be executed safely on \'mysql\'.');
  19.         $this->addSql('INSERT INTO `std_content_types` (`name`, `machine_name`, `created_date`, `updated_date`, `machine_name_categories`) VALUES (\'Pages\', \'pages\', \'2019-04-05 20:41:51\', \'2019-04-05 20:41:52\', \'pages_categories\');');
  20.         $this->addSql('INSERT INTO `std_languages` (`language_code`, `name`) VALUES (\'pt\', \'Português\');');
  21.         $this->addSql('INSERT INTO `std_languages` (`language_code`, `name`, `is_public`, `is_active`) VALUES (\'en\', \'English\',0,0);');
  22.     }
  23.     
  24.     public function down(Schema $schema) : void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql''Migration can only be executed safely on \'mysql\'.');
  28.         $this->addSql('DELETE FROM `std_content_types` WHERE `machine_name`= \'pages\';');
  29.         $this->addSql('DELETE FROM `std_languages` WHERE `language_code`=\'pt\';');
  30.         $this->addSql('DELETE FROM `std_languages` WHERE `language_code`=\'en\';');
  31.     }
  32. }