Nothing wrong in the database. Might be wrong in the way you are trying to create a user. Are you passing in a value for the id when you are trying to create a user?
Jul 9, 2020
6
Level 1
SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "id" violates not-null constraint DETAIL: Failing row contains
Hi, Programmers
Please help me with this error I have been getting for some time now. I have deployed my app on Heroku everything works fine when I access the home page, but when I register a user I get the above error. Is there something wrong with my database tables?
public function up() {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->index();
$table->string('usertype')->nullable();
Please or to participate in this conversation.