mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 09:50:17 -06:00
Merge pull request #969 from acelaya-forks/feature/fix-role-name-length
Feature/fix role name length
This commit is contained in:
commit
ea99b88c44
17
CHANGELOG.md
17
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.
|
||||
|
@ -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, [
|
||||
|
26
data/migrations/Version20210118153932.php
Normal file
26
data/migrations/Version20210118153932.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20210118153932 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// Prev migration used to set the length to 256, which made some set-ups crash
|
||||
// It has been updated to 255, and this migration ensures whoever managed to run the prev one, gets the value
|
||||
// also updated to 255
|
||||
|
||||
$rolesTable = $schema->getTable('api_key_roles');
|
||||
$nameColumn = $rolesTable->getColumn('role_name');
|
||||
$nameColumn->setLength(255);
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user