因此,我设置了一个登台并开发分支,现在在本地注册新用户时出现此错误:
PG::Error: ERROR: null value in column "uid" violates
not-null constraint DETAIL: Failing row contains
(7, test@gmail.com, $2a$10$WfiHKzYq4ovZtZoVAB.fRertuOSWezZYBw.RxkSqfBK89WbzcYxDK,
null, null, null, 0, null, null, null, null,
2013-08-13 07:20:13.484617, 2013-08-13 07:20:13.484617,
null, null, null, null). : INSERT INTO "users"
("created_at", "email", "encrypted_password", "updated_at")
VALUES ($1, $2, $3, $4) RETURNING "uid"
schema.rb 片段
create_table "users", id: false, force: true do |t|
t.integer "id", null: false
t.string "email", default: ""
t.string "encrypted_password", default: ""
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "admin"
t.string "provider"
t.string "uid", null: false
t.string "username"
end
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
在解决这个问题之前,我无法将任何新代码投入生产,这很烦人:/