octicon-rss(16/)
You've already forked yii2
mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 23:50:38 +08:00
Merge pull request #1603 from edin/master
Fixed sequence id match for postgresql
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
octicon-diff(16/tw-mr-1) 1 changed files with 1 additions and 1 deletions
@@ -299,7 +299,7 @@ SQL;
|
|||||||
$table->columns[$column->name] = $column;
|
$table->columns[$column->name] = $column;
|
||||||
if ($column->isPrimaryKey === true) {
|
if ($column->isPrimaryKey === true) {
|
||||||
$table->primaryKey[] = $column->name;
|
$table->primaryKey[] = $column->name;
|
||||||
if ($table->sequenceName === null && preg_match("/nextval\\('\"?\\w+\"?'(::regclass)?\\)/", $column->defaultValue) === 1) {
|
if ($table->sequenceName === null && preg_match("/nextval\\('\"?\\w+\"?\.?\"?\\w+\"?'(::regclass)?\\)/", $column->defaultValue) === 1) {
|
||||||
$table->sequenceName = preg_replace(['/nextval/', '/::/', '/regclass/', '/\'\)/', '/\(\'/'], '', $column->defaultValue);
|
$table->sequenceName = preg_replace(['/nextval/', '/::/', '/regclass/', '/\'\)/', '/\(\'/'], '', $column->defaultValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user