-- AlterTable: 添加邮箱验证状态字段
ALTER TABLE "user_accounts" ADD COLUMN IF NOT EXISTS "email_verified" BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE "user_accounts" ADD COLUMN IF NOT EXISTS "email_verified_at" TIMESTAMP(3);

-- 将已绑定邮箱的用户标记为已验证（历史数据处理）
UPDATE "user_accounts" SET "email_verified" = true, "email_verified_at" = NOW() WHERE "email" IS NOT NULL;
