Răsfoiți Sursa

Merge pull request #794 from acelaya-forks/feature/migrations3

Feature/migrations3
Alejandro Celaya 3 ani în urmă
părinte
comite
e9191732bd
4 a modificat fișierele cu 12 adăugiri și 6 ștergeri
  1. 1 0
      CHANGELOG.md
  2. 1 1
      composer.json
  3. 1 1
      data/migrations_template.txt
  4. 9 4
      migrations.php

+ 1 - 0
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
 

+ 1 - 1
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",

+ 1 - 1
data/migrations_template.txt

@@ -7,7 +7,7 @@ namespace <namespace>;
 use Doctrine\DBAL\Schema\Schema;
 use Doctrine\Migrations\AbstractMigration;
 
-final class Version<version> extends AbstractMigration
+final class <className> extends AbstractMigration
 {
     public function up(Schema $schema): void
     {

+ 9 - 4
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',
+
 ];