migrations/Version20221122083637.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. use Symfony\Component\DependencyInjection\ContainerAwareTrait;
  7. /**
  8.  * Auto-generated Migration: Please modify to your needs!
  9.  */
  10. final class Version20221122083637 extends AbstractMigration
  11. {
  12.     use ContainerAwareTrait;
  13.     public function getDescription(): string
  14.     {
  15.         return '';
  16.     }
  17.     public function up(Schema $schema): void
  18.     {
  19.         $this->addSql('ALTER TABLE city ADD latitude VARCHAR(16) NOT NULL DEFAULT \'55.796790\'');
  20.         $this->addSql('ALTER TABLE city ADD longitude VARCHAR(16) NOT NULL DEFAULT \'49.097709\'');
  21.         $this->addSql('ALTER TABLE city ALTER COLUMN latitude DROP DEFAULT');
  22.         $this->addSql('ALTER TABLE city ALTER COLUMN longitude DROP DEFAULT');
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $this->addSql('ALTER TABLE city DROP latitude');
  28.         $this->addSql('ALTER TABLE city DROP longitude');
  29.     }
  30. }