From 8c1c2cf5cd0885911950581de355ee536d7c62e7 Mon Sep 17 00:00:00 2001 From: Leorne Date: Fri, 6 Dec 2019 13:46:06 +0300 Subject: [PATCH] change accesses table access column to text type --- common/models/Accesses.php | 3 ++- ...accesses_table_access_field_to_text_type.php | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 console/migrations/m191206_100300_accesses_table_access_field_to_text_type.php diff --git a/common/models/Accesses.php b/common/models/Accesses.php index 42b9386..4d3c6c9 100644 --- a/common/models/Accesses.php +++ b/common/models/Accesses.php @@ -32,7 +32,8 @@ class Accesses extends \yii\db\ActiveRecord public function rules() { return [ - [['name', 'access'], 'string', 'max' => 255], + [['name'], 'string', 'max' => 255], + [['access'], 'string'], [['_projects'], 'safe'], [['_users'], 'safe'], ]; diff --git a/console/migrations/m191206_100300_accesses_table_access_field_to_text_type.php b/console/migrations/m191206_100300_accesses_table_access_field_to_text_type.php new file mode 100644 index 0000000..ce27857 --- /dev/null +++ b/console/migrations/m191206_100300_accesses_table_access_field_to_text_type.php @@ -0,0 +1,17 @@ +alterColumn('accesses', 'access', 'text'); + } +}