Commit 574f67fe by Carsten Brandt

fixed test break

parent 739f5fda
......@@ -93,6 +93,7 @@ class ColumnSchema extends Object
return $value;
}
switch ($this->phpType) {
case 'resource':
case 'string':
return is_resource($value) ? $value : (string) $value;
case 'integer':
......
......@@ -49,6 +49,7 @@ class Schema extends \yii\db\Schema
'varchar' => self::TYPE_STRING,
'string' => self::TYPE_STRING,
'char' => self::TYPE_STRING,
'blob' => self::TYPE_BINARY,
'datetime' => self::TYPE_DATETIME,
'year' => self::TYPE_DATE,
'date' => self::TYPE_DATE,
......
......@@ -192,9 +192,9 @@ class SchemaTest extends DatabaseTestCase
'defaultValue' => 1.23,
],
'blob_col' => [
'type' => 'string',
'type' => 'binary',
'dbType' => 'blob',
'phpType' => 'string',
'phpType' => 'resource',
'allowNull' => true,
'autoIncrement' => false,
'enumValues' => null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment