Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix style
  • Loading branch information
SOHELAHMED7 committed Dec 29, 2022
commit 0041f7b7418b5f1283fde5fd206dda218812caf4
4 changes: 1 addition & 3 deletions src/lib/migrations/BaseMigrationBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,7 @@ public static function isEnumValuesChanged(
public function isDefaultValueChanged(
ColumnSchema $current,
ColumnSchema $desired
): bool
{
): bool {
// if the default value is object of \yii\db\Expression then default value is expression instead of constant. See https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html
// in such case instead of comparing two objects, we should compare expression

Expand All @@ -500,4 +499,3 @@ public function isDefaultValueChanged(
return false;
}
}