junaidnasir/larainvite

'status' column in user_invitations does not accept 'Null' value

Closed this issue · 2 comments

Hi there, I came across this issue while fixing a project. The database I am using is on a sql server (so maybe why no other have this issue?). The only way I could get your package to work is if I added this line to the save function in LaraInvite.php $this->instance->status = "pending"; .

Not too sure if that is correct but it works. Hopefully, this will help anyone who has the same issue.

Best,

Vanida

I am facing the same issue in MySQL server. While creating invite status should be set to pending. As we are able to override migrations that's why I have set a default value to pending in the status column.

$table->enum('status', ['pending', 'successful','canceled','expired'])->default('pending');

I hope this will help others.

Thanks,
Indra

Same problem applies to postgres