Version20180316121350.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Application\Migrations;
  3. use Doctrine\DBAL\Migrations\AbstractMigration;
  4. use Doctrine\DBAL\Schema\Schema;
  5. /**
  6. * Auto-generated Migration: Please modify to your needs!
  7. */
  8. class Version20180316121350 extends AbstractMigration
  9. {
  10. /**
  11. * @param Schema $schema
  12. */
  13. public function up(Schema $schema)
  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 host CHANGE options options LONGTEXT DEFAULT NULL');
  18. $this->addSql('ALTER TABLE sub_net CHANGE options options LONGTEXT DEFAULT NULL');
  19. }
  20. /**
  21. * @param Schema $schema
  22. */
  23. public function down(Schema $schema)
  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('ALTER TABLE host CHANGE options options LONGTEXT NOT NULL COLLATE utf8_unicode_ci');
  28. $this->addSql('ALTER TABLE sub_net CHANGE options options LONGTEXT NOT NULL COLLATE utf8_unicode_ci');
  29. }
  30. }