migrations/Version20180412121809.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 Version20180412121809 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 content ADD content_image LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\', ADD content_image_editable TINYINT(1) DEFAULT NULL');
  18. }
  19. /**
  20. * @param Schema $schema
  21. */
  22. public function down(Schema $schema) : void
  23. {
  24. // this down() migration is auto-generated, please modify it to your needs
  25. $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
  26. $this->addSql('ALTER TABLE content DROP content_image, DROP content_image_editable');
  27. }
  28. }