framework/db/SchemaBuilderTrait.php
public function string($length = null)
    {
        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_STRING, $length);
    }
public function string($length = null)
    {
        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_STRING, $length);
    }
Creates a string column.
@param int $length column size definition i.e. the maximum string length.
This parameter will be ignored if not supported by the DBMS.
@return ColumnSchemaBuilder the column instance which can be further customized.
@since 2.0.6