migrations/Version20211002175335.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 Version20211002175335 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->addSql("
  19.         SET @content_id=(SELECT id FROM std_content_types WHERE machine_name='pages_categories'); 
  20.         INSERT INTO `std_content_types_skins` (`content_type_id`, `machine_name`, `name`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`) VALUES (@content_id, 'pages_list', 'Page List', 1, 1, '2021-10-01 16:20:18', 1, '2021-10-01 16:20:20');
  21.         ");
  22.         $this->addSql("
  23.         SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='block_list'); 
  24.         INSERT INTO `std_blocks_skins` (`block_id`, `machine_name`, `name`, `is_active`, `created_by`, `created_date`, `updated_by`, `updated_date`) VALUES (@block_id, 'pages_list', 'Pages List', 1, 1, '2021-10-01 16:18:41', 1, '2021-10-01 16:18:42');
  25.         ");
  26.     }
  27.     public function down(Schema $schema) : void
  28.     {
  29.         // this down() migration is auto-generated, please modify it to your needs
  30.         $this->addSql("
  31.         SET @content_id=(SELECT id FROM std_content_types WHERE machine_name='pages_categories'); 
  32.         delete from `std_content_types_skins` where `content_type_id`=@content_id and `machine_name`='pages_list';
  33.         ");
  34.         $this->addSql("
  35.         SET @block_id=(SELECT id FROM std_blocks WHERE machine_name='block_list'); 
  36.         delete from `std_blocks_skins` where `block_id`=@block_id and `machine_name`='pages_list';
  37.         ");
  38.     }
  39. }