Fix #18303: Fix creating migration issue for column methods used after defaultValues

This commit is contained in:
Walid Said
2020-10-05 00:02:21 +02:00
committed by GitHub
parent 7a50da5cf8
commit 3f3003d823
4 changed files with 55 additions and 1 deletions

View File

@ -581,7 +581,7 @@ class MigrateController extends BaseMigrateController
protected function splitFieldIntoChunks($field)
{
$hasDoubleQuotes = false;
preg_match_all('/defaultValue\(.*?:.*?\)/', $field, $matches);
preg_match_all('/defaultValue\(["\'].*?:?.*?["\']\)/', $field, $matches, PREG_SET_ORDER, 0);
if (isset($matches[0][0])) {
$hasDoubleQuotes = true;
$originalDefaultValue = $matches[0][0];