[Bug] Registration fails with UndefinedColumn: user_email_history.email_hash does not exist
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
UI / 界面体验 · UI / UX
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
阻塞使用 · Blocking (无法使用核心功能 / core function unusable)
复现频率 · Reproducibility
必现 · Always
问题描述 · Description
Describe the bug
New user registration is completely broken. When trying to sign up with a standard email (e.g., Gmail), the server crashes with a database schema error. It seems the code is trying to query or insert into a column named email_hash in the user_email_history table, but that column does not exist in the database.
Error Logs
复现步骤 · Steps to reproduce
Steps to reproduce
- Go to the ZCode registration page.
- Fill in the required registration fields.
- Submit the form.
- The system fails and shows the database error trace.
期望表现 · Expected behavior
The registration process should complete successfully. After submitting the sign-up form, a new user account should be created without any database crashes, allowing the user to log in to the ZCode platform.
实际表现 · Actual behavior
The registration fails immediately after submitting the form. The server returns a database error stating that the column user_email_history.email_hash does not exist, completely blocking the creation of new accounts.
ZCode 版本 · ZCode version
Web / Latest
设备 / 系统 / 浏览器 · Device / OS / Browser
(如果是其他浏览器,比如 Edge 或 Firefox,把 Chrome 改掉即可)
截图 / 录屏 / 日志 · Screenshots / Recordings / Logs
(psycopg2.errors.UndefinedColumn) column user_email_history.email_hash does not exist
LINE 3: WHERE (user_email_history.email_hash = 'e543c595140673f84b20...
^
[SQL: SELECT max(user_email_history.deleted_at) AS max_1 FROM user_email_history WHERE (user_email_history.email_hash = %(email_hash_1)s OR user_email_history.email = %(email_1)s) AND user_email_history.status = %(status_1)s]
[parameters: {'email_hash_1': 'e543c595140673f84b20aefbe58bdabdd15dda390ec685bae30efc68cfbadd7f', 'email_1':
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the schema or migration for the user_email_history table and the registration entry point that queries email_hash. Verify whether the database is missing a migration or the registration query is incompatible with the current schema. Done means a fresh registration completes successfully without the UndefinedColumn error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100