Release 2.45 (#5721)

Co-authored-by: Henning Klein <info@henningklein.de>
This commit is contained in:
Kevin Papst
2025-12-21 16:42:34 +01:00
committed by GitHub
parent 8c1ed68817
commit afb5a0bba4
67 changed files with 905 additions and 254 deletions

View File

@@ -0,0 +1,48 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DoctrineMigrations;
use App\Doctrine\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* @version 2.45
*/
final class Version20251214160001 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add index for a query called on every timesheet page';
}
public function up(Schema $schema): void
{
$table = $schema->getTable('kimai2_tags');
if (!$table->hasIndex('IDX_27CAF54C7AB0E859')) {
// used to count the tags for the dropdown (filter and timesheet edit)
$table->addIndex(['visible'], 'IDX_27CAF54C7AB0E859');
}
}
public function down(Schema $schema): void
{
$table = $schema->getTable('kimai2_tags');
if ($table->hasIndex('IDX_27CAF54C7AB0E859')) {
$table->dropIndex('IDX_27CAF54C7AB0E859');
}
}
public function isTransactional(): bool
{
return false;
}
}