migrations/Identity/Version20200226160719_Types.php line 1

  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations\Identity;
  4. use App\Doctrine\Type\Identity\PassportType;
  5. use App\Doctrine\Type\Identity\UserGender;
  6. use App\Doctrine\Type\Identity\UserRole;
  7. use App\Doctrine\Type\Identity\UserStatus;
  8. use Doctrine\DBAL\Schema\Schema;
  9. use Doctrine\Migrations\AbstractMigration;
  10. /**
  11.  * Auto-generated Migration: Please modify to your needs!
  12.  */
  13. final class Version20200226160719_Types extends AbstractMigration
  14. {
  15.     public function getDescription(): string
  16.     {
  17.         return 'Import all user related custom types';
  18.     }
  19.     public function up(Schema $schema): void
  20.     {
  21.         $this->addSql(UserRole::getRegistrationSQL());
  22.         $this->addSql(UserGender::getRegistrationSQL());
  23.         $this->addSql(UserStatus::getRegistrationSQL());
  24.         $this->addSql(PassportType::getRegistrationSQL());
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         $this->addSql(UserRole::getDeletionSQL());
  29.         $this->addSql(UserGender::getDeletionSQL());
  30.         $this->addSql(UserStatus::getDeletionSQL());
  31.         $this->addSql(PassportType::getDeletionSQL());
  32.     }
  33. }