From e8e8b5ddc8dc06a307bd4b2791380fdc2cbd1d6c Mon Sep 17 00:00:00 2001 From: nojimage Date: Thu, 25 Mar 2021 15:25:04 +0900 Subject: [PATCH] Increase model fields length --- ...210325152201_IncreaseModelFieldsLength.php | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 config/Migrations/20210325152201_IncreaseModelFieldsLength.php diff --git a/config/Migrations/20210325152201_IncreaseModelFieldsLength.php b/config/Migrations/20210325152201_IncreaseModelFieldsLength.php new file mode 100644 index 0000000..9c8e1b1 --- /dev/null +++ b/config/Migrations/20210325152201_IncreaseModelFieldsLength.php @@ -0,0 +1,56 @@ +table('activity_logs', ['id' => false, 'collation' => 'utf8_general_ci']); + $table + ->changeColumn('scope_model', 'string', [ + 'default' => null, + 'limit' => 128, + 'null' => false, + ]) + ->changeColumn('issuer_model', 'string', [ + 'default' => null, + 'limit' => 128, + 'null' => true, + ]) + ->changeColumn('object_model', 'string', [ + 'default' => null, + 'limit' => 128, + 'null' => true, + ]); + $table->update(); + } + + public function down() + { + $table = $this->table('activity_logs', ['id' => false, 'collation' => 'utf8_general_ci']); + $table + ->changeColumn('scope_model', 'string', [ + 'default' => null, + 'limit' => 64, + 'null' => false, + ]) + ->changeColumn('issuer_model', 'string', [ + 'default' => null, + 'limit' => 64, + 'null' => true, + ]) + ->changeColumn('object_model', 'string', [ + 'default' => null, + 'limit' => 64, + 'null' => true, + ]); + $table->update(); + } +}