<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190607065619 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, 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 booking ADD notes LONGTEXT NOT NULL');
$this->addSql('DROP INDEX log_class_lookup_idx ON ext_log_entries');
$this->addSql('DROP INDEX log_version_lookup_idx ON ext_log_entries');
$this->addSql('DROP INDEX log_user_lookup_idx ON ext_log_entries');
$this->addSql('CREATE INDEX log_class_lookup_idx ON ext_log_entries (object_class)');
$this->addSql('CREATE INDEX log_version_lookup_idx ON ext_log_entries (object_id, object_class, version)');
$this->addSql('CREATE INDEX log_user_lookup_idx ON ext_log_entries (username)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, 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 booking DROP notes');
$this->addSql('DROP INDEX log_class_lookup_idx ON ext_log_entries');
$this->addSql('DROP INDEX log_user_lookup_idx ON ext_log_entries');
$this->addSql('DROP INDEX log_version_lookup_idx ON ext_log_entries');
$this->addSql('CREATE INDEX log_class_lookup_idx ON ext_log_entries (object_class(191))');
$this->addSql('CREATE INDEX log_user_lookup_idx ON ext_log_entries (username(191))');
$this->addSql('CREATE INDEX log_version_lookup_idx ON ext_log_entries (object_id, object_class(191), version)');
}
}