coze-dev / coze-dev/coze-studio

database when add `time` column,internal error

Open
#2,502 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

Image

Add a new column in database type time, error occurs.

error log:

2025/11/21 15:17:37.188543 mysql.go:217: [Info] [log-id: fea2598e-3d9d-4a9f-adef-20e856be7121] [AlterTable] execute sql is ALTER TABLE `table_7575069489549541376` ADD COLUMN `f_3` TIMESTAMP, MODIFY COLUMN `f_1` BOOLEAN, MODIFY COLUMN `f_2` TEXT, req is &{table_7575069489549541376 [0xc00312b840 0xc00312b880 0xc00312b8c0]}
2025/11/21 15:17:37.189194 error_resp.go:48: [Error] [log-id: fea2598e-3d9d-4a9f-adef-20e856be7121] [InternalError] error: update draft physical table failed: failed to alter table: Error 1067 (42000): Invalid default value for 'f_3'
2025/11/21 15:17:37 /app/infra/impl/rdb/mysql.go:219 Error 1067 (42000): **Invalid default value for 'f_3'**

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at infra/impl/rdb/mysql.go around line 219 and trace the AlterTable execution shown in the log. Reproduce adding a database time column, then verify the alteration no longer fails with MySQL error 1067 about an invalid default value.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.