Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

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

Open
tossp opened this issue Oct 3, 2015 · 2 comments
Open

Comments

@tossp
Copy link
Contributor

tossp commented Oct 3, 2015

RT

@tossp
Copy link
Contributor Author

tossp commented Oct 3, 2015

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=, [email protected], 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

@lunny
Copy link
Member

lunny commented Oct 6, 2015

我检查下。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants