yii\db\SchemaBuilderTrait::string PHP Méthode

string() public méthode

Creates a string column.
Since: 2.0.6
public string ( integer $length = null ) : ColumnSchemaBuilder
$length integer column size definition i.e. the maximum string length. This parameter will be ignored if not supported by the DBMS.
Résultat ColumnSchemaBuilder the column instance which can be further customized.
    public function string($length = null)
    {
        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_STRING, $length);
    }