"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/db/schema/mysql/CMysqlColumnSchema.php" between
yii-1.1.19.5790cb.tar.gz and yii-1.1.20.6ed384.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

CMysqlColumnSchema.php  (yii-1.1.19.5790cb):CMysqlColumnSchema.php  (yii-1.1.20.6ed384)
skipping to change at line 47 skipping to change at line 47
/** /**
* Extracts the default value for the column. * Extracts the default value for the column.
* The value is typecasted to correct PHP type. * The value is typecasted to correct PHP type.
* @param mixed $defaultValue the default value obtained from metadata * @param mixed $defaultValue the default value obtained from metadata
*/ */
protected function extractDefault($defaultValue) protected function extractDefault($defaultValue)
{ {
if(strncmp($this->dbType,'bit',3)===0) if(strncmp($this->dbType,'bit',3)===0)
$this->defaultValue=bindec(trim($defaultValue,'b\'')); $this->defaultValue=bindec(trim($defaultValue,'b\''));
elseif(($this->dbType==='timestamp' || $this->dbType==='datetime' ) && $defaultValue==='CURRENT_TIMESTAMP') elseif(($this->dbType==='timestamp' || $this->dbType==='datetime' ) && ($defaultValue==='CURRENT_TIMESTAMP' || $defaultValue==='current_timestamp ()'))
$this->defaultValue=null; $this->defaultValue=null;
else else
parent::extractDefault($defaultValue); parent::extractDefault($defaultValue);
} }
/** /**
* Extracts size, precision and scale information from column's DB type. * Extracts size, precision and scale information from column's DB type.
* @param string $dbType the column's DB type * @param string $dbType the column's DB type
*/ */
protected function extractLimit($dbType) protected function extractLimit($dbType)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)