migrations/Version20200424110652.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 Version20200424110652 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("INSERT INTO `std_pages` (`id`, `template_id`, `created_by`, `updated_by`, `title`, `content_type`, `is_active`, `created_date`, `updated_date`, `order_value`, `publish_date`, `expire_date`) VALUES(1, NULL, 1, 1, 'Home', 6, 1, '2020-04-21 15:52:05', '2020-04-23 14:33:55', NULL, '2020-04-21 15:51:00', NULL);");
  19.         $this->addSql("INSERT INTO `std_friendly_url` (`page_id`, `url`, `relation_tree`, `relation_id`, `language_code`, `is_canonical`) VALUES(1, '/pt/home', '[]', NULL, 'pt', 1);");
  20.         $this->addSql('INSERT INTO `std_pages_content` (`page_id`, `language_code`, `created_by`, `updated_by`, `is_active`, `created_date`, `updated_date`, `title`, `url`, `canonical_url`, `meta_title`, `meta_keywords`, `meta_description`, `og_title`, `og_image`, `og_description`, `og_url`, `scripts_head`, `scripts_body`, `scripts_footer`, `content`) VALUES (1, \'pt\', 1, 1, 1, \'2020-04-21 15:52:05\', \'2020-04-23 14:33:55\', \'Home\', \'Home\', NULL, \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'\', \'[]\');');
  21.     }
  22.     public function down(Schema $schema) : void
  23.     {        
  24.         $this->addSql("DELETE FROM `std_friendly_url` WHERE `page_id`=1");
  25.         $this->addSql("DELETE FROM `std_pages_content` WHERE `page_id`=1");
  26.         $this->addSql("DELETE FROM `std_pages` WHERE `id`=1");
  27.     }
  28. }