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

Feature/migrations3
This commit is contained in:
Alejandro Celaya 2020-06-21 13:21:14 +02:00 committed by GitHub
commit e9191732bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 6 deletions

View File

@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
#### Changed #### Changed
* [#508](https://github.com/shlinkio/shlink/issues/508) Added mutation checks to database tests. * [#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 #### Deprecated

View File

@ -20,7 +20,7 @@
"cocur/slugify": "^4.0", "cocur/slugify": "^4.0",
"doctrine/cache": "^1.9", "doctrine/cache": "^1.9",
"doctrine/dbal": "^2.10", "doctrine/dbal": "^2.10",
"doctrine/migrations": "^2.2", "doctrine/migrations": "^3.0.1",
"doctrine/orm": "^2.7", "doctrine/orm": "^2.7",
"endroid/qr-code": "^3.6", "endroid/qr-code": "^3.6",
"geoip2/geoip2": "^2.9", "geoip2/geoip2": "^2.9",

View File

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

View File

@ -3,9 +3,14 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
'name' => 'ShlinkMigrations',
'migrations_namespace' => 'ShlinkMigrations', // 'name' => 'ShlinkMigrations',
'migrations_paths' => [
'ShlinkMigrations' => 'data/migrations',
],
'table_storage' => [
'table_name' => 'migrations', 'table_name' => 'migrations',
'migrations_directory' => 'data/migrations', ],
'custom_template' => 'data/migrations_template.txt', 'custom_template' => 'data/migrations_template.txt',
]; ];