Skip to content

Commit

Permalink
Merge pull request #2288 from shlinkio/develop
Browse files Browse the repository at this point in the history
Release 4.3.1
  • Loading branch information
acelaya authored Nov 25, 2024
2 parents 6428903 + 557c742 commit 8d4f2bb
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).

# [4.3.1] - 2024-11-25
### Added
* *Nothing*

### Changed
* *Nothing*

### Deprecated
* *Nothing*

### Removed
* *Nothing*

### Fixed
* [#2285](https://github.com/shlinkio/shlink/issues/2285) Fix performance degradation when using Microsoft SQL due to incorrect order of columns in `unique_short_code_plus_domain` index.


## [4.3.0] - 2024-11-24
### Added
* [#2159](https://github.com/shlinkio/shlink/issues/2159) Add support for PHP 8.4.
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-pdo": "*",
"acelaya/crawler-detect": "^1.3",
"acelaya/ip-address-middleware": "^2.4",
"akrabat/ip-address-middleware": "^2.4",
"cakephp/chronos": "^3.1",
"doctrine/dbal": "^4.2",
"doctrine/migrations": "^3.8",
Expand All @@ -29,6 +28,7 @@
"geoip2/geoip2": "^3.0",
"guzzlehttp/guzzle": "^7.9",
"hidehalo/nanoid-php": "^2.0",
"jaybizzle/crawler-detect": "^1.3",
"laminas/laminas-config-aggregator": "^1.15",
"laminas/laminas-diactoros": "^3.5",
"laminas/laminas-inputfilter": "^2.30",
Expand Down
28 changes: 28 additions & 0 deletions module/Core/migrations/Version20241125213106.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace ShlinkMigrations;

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

final class Version20241125213106 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->skipIf(! $this->isMsSql());

// Recreate unique_short_code_plus_domain index in Microsoft SQL, as it accidentally has the columns defined in
// the wrong order after Version20230130090946 migration
$shortUrls = $schema->getTable('short_urls');
$shortUrls->dropIndex('unique_short_code_plus_domain');
$shortUrls->addUniqueIndex(['short_code', 'domain_id'], 'unique_short_code_plus_domain');
}

private function isMsSql(): bool
{
return $this->connection->getDatabasePlatform() instanceof SQLServerPlatform;
}
}

0 comments on commit 8d4f2bb

Please sign in to comment.