forked from yiisoft/yii
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yiisoft#2349 from resurtm/fixes-2336
Fixes yiisoft#2336: PostgreSQL: CDbCommandBuilder uses `NULL` instead of `DEFAULT` as default value for the primary keys of serial type.
- Loading branch information
Showing
8 changed files
with
114 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* CPgsqlCommandBuilder class file. | ||
* | ||
* @author Timur Ruziev <resurtm@gmail.com> | ||
* @link http://www.yiiframework.com/ | ||
* @copyright 2008-2013 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
/** | ||
* CPgsqlCommandBuilder provides basic methods to create query commands for tables. | ||
* | ||
* @author Timur Ruziev <resurtm@gmail.com> | ||
* @package system.db.schema.pgsql | ||
* @since 1.1.14 | ||
*/ | ||
class CPgsqlCommandBuilder extends CDbCommandBuilder | ||
{ | ||
/** | ||
* Returns default value of the integer/serial primary key. Default value means that the next | ||
* autoincrement/sequence value would be used. | ||
* @return string default value of the integer/serial primary key. | ||
* @since 1.1.14 | ||
*/ | ||
protected function getIntegerPrimaryKeyDefaultValue() | ||
{ | ||
return 'DEFAULT'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters