pq:ERROR null value in column "is_delete" violates not-null constraint #303

Open
opened 2015-10-03 16:00:12 +00:00 by tossp · 2 comments
tossp commented 2015-10-03 16:00:12 +00:00 (Migrated from github.com)

RT

RT
tossp commented 2015-10-03 16:02:37 +00:00 (Migrated from github.com)
INSERT INTO "users" 
("u_i_d", "user_name", "nick_name", "password", "email", "phone", "about", "gr_email", "is_admin", "is_active", "is_forbid", "rands", "created_user_i_d", "updated_user_i_d", "created_at", "updated_at")
 VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) 
DETAIL  Failing row contains (ef4f38ca-f117-435b-8bb5-03480cbb29b2, zh55, 11111, WNu/QLdCM5iGdul9G+oqxYfBU0zvYNq5/3NL4q4wiYs=, 111@11.cn, 15555555555, 备注, , f, f, f, null, Q5AMrUjYI1, null, null, 1a864896-cd36-412f-a90e-0f836deb4071, 1a864896-cd36-412f-a90e-0f836deb4071, 2015-10-03 23:58:37, 2015-10-03 23:58:37, null).    

今天更新到最新版突然报这个错,

DeletedAt 的字段定义

DeletedAt     time.Time `xorm:"deleted" description:"记录删除日期`

对比了一下数据库中的结果,以前是0现在是null

``` sql INSERT INTO "users" ("u_i_d", "user_name", "nick_name", "password", "email", "phone", "about", "gr_email", "is_admin", "is_active", "is_forbid", "rands", "created_user_i_d", "updated_user_i_d", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) ``` ``` DETAIL Failing row contains (ef4f38ca-f117-435b-8bb5-03480cbb29b2, zh55, 11111, WNu/QLdCM5iGdul9G+oqxYfBU0zvYNq5/3NL4q4wiYs=, 111@11.cn, 15555555555, 备注, , f, f, f, null, Q5AMrUjYI1, null, null, 1a864896-cd36-412f-a90e-0f836deb4071, 1a864896-cd36-412f-a90e-0f836deb4071, 2015-10-03 23:58:37, 2015-10-03 23:58:37, null). ``` 今天更新到最新版突然报这个错, DeletedAt 的字段定义 ``` DeletedAt time.Time `xorm:"deleted" description:"记录删除日期` ``` 对比了一下数据库中的结果,以前是`0`现在是`null`

我检查下。

我检查下。
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#303
No description provided.