Skip to content

Commit

Permalink
Minor change for virtual column detection
Browse files Browse the repository at this point in the history
  • Loading branch information
hisorange committed Dec 29, 2017
1 parent eb2a10a commit 62c75f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Ifsnop/Mysqldump/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -1860,8 +1860,9 @@ public function parseColumnType($colType)
}
$colInfo['is_numeric'] = in_array($colInfo['type'], $this->mysqlTypes['numerical']);
$colInfo['is_blob'] = in_array($colInfo['type'], $this->mysqlTypes['blob']);
// for virtual 'Extra' -> "STORED GENERATED"
$colInfo['is_virtual'] = strpos($colType['Extra'], "STORED GENERATED") === false ? false : true;
// for virtual 'Extra' -> "GENERATED"
// MySQL reference: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html
$colInfo['is_virtual'] = strpos($colType['Extra'], "GENERATED") === false ? false : true;

return $colInfo;
}
Expand Down

0 comments on commit 62c75f5

Please sign in to comment.