4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-13 20:56:36 +00:00
AzuraCast/src/Entity/Migration/Version20180826011103.php
2020-10-14 17:19:31 -05:00

27 lines
695 B
PHP

<?php
declare(strict_types=1);
namespace App\Entity\Migration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Update the index on song_history.
*/
final class Version20180826011103 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('DROP INDEX sort_idx ON song_history');
$this->addSql('CREATE INDEX history_idx ON song_history (timestamp_start, timestamp_end, listeners_start)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP INDEX history_idx ON song_history');
$this->addSql('CREATE INDEX sort_idx ON song_history (timestamp_start)');
}
}