migrations/Version20221018100750.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 Version20221018100750 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('CREATE TABLE badge (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, type INT NOT NULL, top_distance INT NOT NULL, company_distance INT NOT NULL, bottom_correction INT DEFAULT NULL, name_font_size INT NOT NULL, company_font_size INT NOT NULL, active TINYINT(1) NOT NULL, date_added DATETIME NOT NULL, date_modified DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  19.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (1, 'SINGLE TOP', 1, 19, 3, NULL, 20, 20, 1, '2022-10-17 17:31:00', '2022-10-17 17:31:00')");
  20.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (2, 'SINGLE MIDDLE', 1, 65, 1, NULL, 20, 20, 1, '2022-10-15 11:22:52', '2022-10-15 11:22:52')");
  21.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (3, 'SINGLE BOTTOM', 1, 130, 2, NULL, 20, 20, 1, '2022-10-17 17:14:44', '2022-10-17 17:14:44')");
  22.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (4, 'MIRROR TOP', 2, 0, 5, 120, 20, 20, 1, '2022-10-17 17:33:33', '2022-10-17 17:33:33')");
  23.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (5, 'MIRROR MIDDLE', 2, 15, 5, 45, 70, 45, 1, '2022-10-17 17:05:19', '2022-10-17 17:05:19')");
  24.         $this->addSql("INSERT INTO `badge` (`id`, `name`, `type`, `top_distance`, `company_distance`, `bottom_correction`, `name_font_size`, `company_font_size`, `active`, `date_added`, `date_modified`) VALUES (6, 'MIRROR BOTTOM', 2, 60, 1, -60, 20, 20, 1, '2022-10-15 13:13:48', '2022-10-15 13:13:48')");
  25.         $this->addSql("INSERT INTO `setting` (`id`, `name`, `value`, `translation_key`) VALUES (5, 'badge_type', '5', 'settings.badge_type');");
  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('DROP TABLE badge');
  31.         $this->addSql('DELETE FROM `setting` WHERE `id` = 5');
  32.     }
  33. }