Skip to content

Commit dc26a50

Browse files
committed
add json/jsonb casting for alert columns
1 parent 07e6e81 commit dc26a50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/migrations/BaseMigrationBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ protected function isNeedUsingExpression(string $fromType, string $toType):bool
392392
if (in_array($fromType, $ints) && in_array($toType, $ints)) {
393393
return false;
394394
}
395-
$dates = ['date', 'timestamp'];
396-
return !(in_array($fromType, $dates) && in_array($toType, $dates));
395+
$specific = ['json', 'jsonb', 'date', 'timestamp'];
396+
return !(in_array($fromType, $specific) && in_array($toType, $specific));
397397
}
398398
}

0 commit comments

Comments
 (0)