From eef49478fc8c96aa18f0cff8b81bf0a39ed8c3e6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 18 Jan 2021 17:14:46 +0100 Subject: [PATCH] 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 + { + } +}