Skip to content

Commit

Permalink
Apply work-around for yiisoft/yii2#20209
Browse files Browse the repository at this point in the history
  • Loading branch information
SOHELAHMED7 committed Jun 22, 2024
1 parent e0b96a3 commit f06d6dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/SchemaToDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,8 @@ public static function attributesFromColumnSchemas(array $columnSchemas)
])
&& $columnSchema->isPrimaryKey === true && $columnSchema->autoIncrement
) {
if (stripos($columnSchema->dbType, 'BIGINT') !== false # MySQL, MariaDB
|| stripos($columnSchema->dbType, 'bigserial') !== false # PgSQL
) {
str_ireplace(['BIGINT', 'int8', 'bigserial', 'serial8'], 'nothing',$columnSchema->dbType, $count); # can be refactored if https://github.com/yiisoft/yii2/issues/20209 is fixed
if ($count) {
if ($columnSchema->unsigned) {
$attribute->dbType = Schema::TYPE_UBIGPK;
} else {
Expand Down

0 comments on commit f06d6dc

Please sign in to comment.