You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
610 B
30 lines
610 B
5 years ago
|
<?php
|
||
|
/**
|
||
|
* @link http://www.yiiframework.com/
|
||
|
* @copyright Copyright (c) 2008 Yii Software LLC
|
||
|
* @license http://www.yiiframework.com/license/
|
||
|
*/
|
||
|
|
||
|
namespace yii\db\mssql;
|
||
|
|
||
|
/**
|
||
|
* Class ColumnSchema for MSSQL database
|
||
|
*
|
||
|
* @since 2.0.23
|
||
|
*/
|
||
|
class ColumnSchema extends \yii\db\ColumnSchema
|
||
|
{
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function phpTypecast($value)
|
||
|
{
|
||
|
if ($value !== null) {
|
||
|
// convert from MSSQL column_default format, e.g. ('1') -> 1, ('string') -> string
|
||
|
$value = trim($value, "'()");
|
||
|
}
|
||
|
|
||
|
return parent::phpTypecast($value);
|
||
|
}
|
||
|
}
|