From eef49478fc8c96aa18f0cff8b81bf0a39ed8c3e6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 18 Jan 2021 17:14:46 +0100 Subject: [PATCH 1/3] Fixed migrations so that api_key_roles index does not fail --- data/migrations/Version20210102174433.php | 2 +- data/migrations/Version20210118153932.php | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 data/migrations/Version20210118153932.php diff --git a/data/migrations/Version20210102174433.php b/data/migrations/Version20210102174433.php index 95ee62fe..835fcbda 100644 --- a/data/migrations/Version20210102174433.php +++ b/data/migrations/Version20210102174433.php @@ -25,7 +25,7 @@ final class Version20210102174433 extends AbstractMigration $table->setPrimaryKey(['id']); $table->addColumn('role_name', Types::STRING, [ - 'length' => 256, + 'length' => 255, 'notnull' => true, ]); $table->addColumn('meta', Types::JSON, [ diff --git a/data/migrations/Version20210118153932.php b/data/migrations/Version20210118153932.php new file mode 100644 index 00000000..e17ff533 --- /dev/null +++ b/data/migrations/Version20210118153932.php @@ -0,0 +1,26 @@ +getTable('api_key_roles'); + $nameColumn = $rolesTable->getColumn('role_name'); + $nameColumn->setLength(255); + } + + public function down(Schema $schema): void + { + } +} From 8132113ed96d1ac6352bb59d74944a8a9a5bf9ae Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 18 Jan 2021 17:16:38 +0100 Subject: [PATCH 2/3] Updated changelog --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f034cd0..5376959a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). +## [Unreleased] +### Added +* *Nothing* + +### Changed +* *Nothing* + +### Deprecated +* *Nothing* + +### Removed +* *Nothing* + +### Fixed +* [#968](https://github.com/shlinkio/shlink/issues/968) Fixed index error in MariaDB while updating to v2.5.0. + + ## [2.5.0] - 2021-01-17 ### Added * [#795](https://github.com/shlinkio/shlink/issues/795) and [#882](https://github.com/shlinkio/shlink/issues/882) Added new roles system to API keys. From 45d162e71aa50460bf17a573addc1db429123cd3 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 18 Jan 2021 17:22:09 +0100 Subject: [PATCH 3/3] Updated roleName col length in entity metadata definition --- .../Shlinkio.Shlink.Rest.Entity.ApiKeyRole.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Rest/config/entities-mappings/Shlinkio.Shlink.Rest.Entity.ApiKeyRole.php b/module/Rest/config/entities-mappings/Shlinkio.Shlink.Rest.Entity.ApiKeyRole.php index 9c6355e3..b7787b1a 100644 --- a/module/Rest/config/entities-mappings/Shlinkio.Shlink.Rest.Entity.ApiKeyRole.php +++ b/module/Rest/config/entities-mappings/Shlinkio.Shlink.Rest.Entity.ApiKeyRole.php @@ -24,7 +24,7 @@ return static function (ClassMetadata $metadata, array $emConfig): void { $builder->createField('roleName', Types::STRING) ->columnName('role_name') - ->length(256) + ->length(255) ->nullable(false) ->build();