Add user email attributes migration and fix missing break statement in V23

Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-04 22:15:50 +00:00
parent c3a3717bde
commit 4283671d49

View file

@ -139,7 +139,7 @@ class V23 extends Migration
} catch (\Throwable $th) {
Console::warning("Failed to migration error attribute size in collection {$id}: {$th->getMessage()}");
}
break;
case 'buckets':
try {
$this->createAttributeFromCollection($this->dbForProject, $id, 'transformations');
@ -148,6 +148,21 @@ class V23 extends Migration
}
$this->dbForProject->purgeCachedCollection($id);
break;
case 'users':
$attributes = [
'emailCanonical',
'emailIsFree',
'emailIsDisposable',
'emailIsCorporate',
'emailIsCanonical',
];
try {
$this->createAttributesFromCollection($this->dbForProject, $id, $attributes);
} catch (\Throwable $th) {
Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}");
}
$this->dbForProject->purgeCachedCollection($id);
break;
default:
break;
}