migrations/Version20251029132623.php line 1

Open in your IDE?
  1. <?php
  2. namespace DoctrineMigrations;
  3. use Doctrine\Migrations\AbstractMigration;
  4. use Doctrine\DBAL\Schema\Schema;
  5. /**
  6. * Auto-generated Migration: Please modify to your needs!
  7. */
  8. class Version20251029132623 extends AbstractMigration
  9. {
  10. /**
  11. * @param Schema $schema
  12. */
  13. public function up(Schema $schema): void
  14. {
  15. // this up() migration is auto-generated, please modify it to your needs
  16. $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
  17. $this->addSql('ALTER TABLE gemeinde ADD uid CHAR(36) DEFAULT NULL COMMENT \'(DC2Type:guid)\'');
  18. $this->addSql('CREATE UNIQUE INDEX UNIQ_4275AB67539B0606 ON gemeinde (uid)');
  19. }
  20. /**
  21. * @param Schema $schema
  22. */
  23. public function down(Schema $schema): void
  24. {
  25. // this down() migration is auto-generated, please modify it to your needs
  26. $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
  27. $this->addSql('DROP INDEX UNIQ_4275AB67539B0606 ON gemeinde');
  28. $this->addSql('ALTER TABLE gemeinde DROP uid');
  29. }
  30. }