change accesses table access column to text type

This commit is contained in:
Leorne 2019-12-06 13:46:06 +03:00
parent 888080229a
commit 8c1c2cf5cd
2 changed files with 19 additions and 1 deletions

View File

@ -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'],
];

View File

@ -0,0 +1,17 @@
<?php
use yii\db\Migration;
/**
* Class m191206_100300_accesses_table_access_field_to_text_type
*/
class m191206_100300_accesses_table_access_field_to_text_type extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->alterColumn('accesses', 'access', 'text');
}
}