diff --git a/CHANGELOG.md b/CHANGELOG.md index b2358670..4f01eecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this #### Changed * [#508](https://github.com/shlinkio/shlink/issues/508) Added mutation checks to database tests. +* [#790](https://github.com/shlinkio/shlink/issues/790) Updated to doctrine/migrations v3. #### Deprecated diff --git a/composer.json b/composer.json index 997f8558..86e35f3f 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "cocur/slugify": "^4.0", "doctrine/cache": "^1.9", "doctrine/dbal": "^2.10", - "doctrine/migrations": "^2.2", + "doctrine/migrations": "^3.0.1", "doctrine/orm": "^2.7", "endroid/qr-code": "^3.6", "geoip2/geoip2": "^2.9", diff --git a/data/migrations_template.txt b/data/migrations_template.txt index c7b938f2..482236e6 100644 --- a/data/migrations_template.txt +++ b/data/migrations_template.txt @@ -7,7 +7,7 @@ namespace ; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; -final class Version extends AbstractMigration +final class extends AbstractMigration { public function up(Schema $schema): void { diff --git a/migrations.php b/migrations.php index 364f52ad..8d11ab91 100644 --- a/migrations.php +++ b/migrations.php @@ -3,9 +3,14 @@ declare(strict_types=1); return [ - 'name' => 'ShlinkMigrations', - 'migrations_namespace' => 'ShlinkMigrations', - 'table_name' => 'migrations', - 'migrations_directory' => 'data/migrations', + +// 'name' => 'ShlinkMigrations', + 'migrations_paths' => [ + 'ShlinkMigrations' => 'data/migrations', + ], + 'table_storage' => [ + 'table_name' => 'migrations', + ], 'custom_template' => 'data/migrations_template.txt', + ];