Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving a webhook causes an error #3

Closed
luceos opened this issue Dec 10, 2018 · 3 comments

Comments

@luceos
Copy link

commented Dec 10, 2018

Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field 'error' doesn't have a default value (SQL: insert into `webhooks` (`service`, `url`, `events`) values (discord, https://discordapp.com/api/webhooks/<yesthatsright>, [])) in /home/forge/forum.flagrow.io/vendor/illuminate/database/Connection.php:664

Seems you created migrations that don't have nullable() or default(), eg:

$table->string('error')->nullable();
@luceos

This comment has been minimized.

Copy link
Author

commented Dec 10, 2018

The column throwing the error was error not events. Check your create handler and compare the properties you set versus those that cannot be null according to your migration.

Look at the trace error message please. 😝

@datitisev

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

🤦‍♂️ I don't know how I decided the issue was the events. The first time I read it I understood it properly.

@datitisev datitisev reopened this Dec 10, 2018
@datitisev datitisev closed this in a29efdf Dec 10, 2018
@datitisev

This comment has been minimized.

Copy link
Member

commented Dec 10, 2018

I can't reproduce, but it seems MySQL or Eloquent is converting null into an empty string... Made it nullable, should be ok now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.