Show error when unique index creation fails

This commit is contained in:
Kijin Sung 2025-05-29 22:27:55 +09:00
parent 4632a10a31
commit fda92b368d
2 changed files with 7 additions and 3 deletions

View file

@ -388,7 +388,11 @@ class Member extends ModuleObject
}
if(!$oDB->isIndexExists('member_auth_mail', 'unique_auth_key'))
{
$oDB->addIndex('member_auth_mail', 'unique_auth_key', ['auth_key'], true);
$output = $oDB->addIndex('member_auth_mail', 'unique_auth_key', ['auth_key'], true);
if (!$output->toBool())
{
return $output;
}
}
if(!$oDB->isIndexExists('member_auth_mail', 'idx_member_srl'))
{