Skip to content
Advertisement

Integrity constraint violation: 1048 Column ‘ip’ cannot be null (SQL: insert into `users` (`name`, `steamid`, `avatar`, `token`, `ip`)

So i am trying to login to my site via steam api and this error pops up SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘ip’ cannot be null. SQL:

JavaScript

i use laravel php7.0 and phpmyadmin on a ubuntu 16.04 server vmware

This is the structure of my database

And this is the users one where i have problems

If you could help me out it would be amazing thanks

code:

JavaScript

Advertisement

Answer

The definition for this column is:

JavaScript

Which is both egregiously huge, as TEXT is intended to support up to 64K of data, and also strictly “NOT NULL” which means it must be populated.

You probably want to alter it to be:

JavaScript

Which you can do with a Laravel migration.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement