<?php
namespace Neos\Flow\Persistence\Doctrine\Migrations;

use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your needs! This block will be used as the migration description if getDescription() is not used.
 */
class Version20200424153333 extends AbstractMigration
{

    /**
     * @return string
     */
    public function getDescription()
    {
        return '';
    }

    /**
     * @param Schema $schema
     * @return void
     */
    public function up(Schema $schema)
    {
        // this up() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');

        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_address ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_article ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_category ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_event ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_eventdate ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_eventtag ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_service ADD languagegrouping VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_starclassification ADD languagegrouping VARCHAR(255) DEFAULT NULL');
    }

    /**
     * @param Schema $schema
     * @return void
     */
    public function down(Schema $schema)
    {
        // this down() migration is autogenerated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on "mysql".');

        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_address DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_article DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_category DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_event DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_eventdate DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_eventtag DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_service DROP languagegrouping');
        $this->addSql('ALTER TABLE newland_toubiz_sync_neos_domain_model_starclassification DROP languagegrouping');
    }
}
