migrations/Version20220901081125.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 Version20220901081125 extends AbstractMigration
  10. {
  11.     /**
  12.      * @return string
  13.      */
  14.     public function getDescription(): string
  15.     {
  16.         return 'adding floor in property';
  17.     }
  18.     /**
  19.      * @param Schema $schema
  20.      * @return void
  21.      */
  22.     public function up(Schema $schema): void
  23.     {
  24.         $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql''Migration can only be executed safely on \'postgresql\'.');
  25.         $this->addSql('ALTER TABLE property ADD floor INT DEFAULT NULL');
  26.     }
  27.     /**
  28.      * @param Schema $schema
  29.      * @return void
  30.      */
  31.     public function down(Schema $schema): void
  32.     {
  33.         $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql''Migration can only be executed safely on \'postgresql\'.');
  34.         $this->addSql('ALTER TABLE property DROP floor');
  35.     }
  36. }