PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Integrity constraint violation: 19 NOT NULL constraint failed: users.avatar

Solved
chrisd

Nov 15th, 2024 04:18 PM

Hi, Not sure where to post this. GitHub Wave does not have the Issue tab.

Installed Herd on Windows, installed Wave with Autoinstaller (very cool feature)

Went to Admin > Users, Went to create a new User, then got an error when submitting the form; SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: users.avatar

2024-11-16 11_12_30-Settings.jpg

bobbyiliev

Nov 16th, 2024 05:23 AM

Best Answer

Hey!

Thank you for reporting this bug!

I've submitted a PR with a fix here:

Make user avatar required #161

You can cherry pick the change or wait for this to be released in the next version.

Let me know if anything else pops up!

- Bobby

Report
1
chrisd

Nov 17th, 2024 12:16 PM

Was this the right forum to post this?

bobbyiliev

Nov 17th, 2024 12:40 PM

Yep! Posting questions here works great.

easypeasy

Nov 24th, 2024 09:03 AM

Hi Bobby, just looked at your fix. Wouldn't it be better not to declare the avatar field as a mandatory field and only make it mandatory via a settings option if necessary?

Declaring an avatar as a mandatory field on the database side doesn't feel like the right decision to me. What do you think?

bobbyiliev

Nov 25th, 2024 01:57 AM

Hey!

Yes, that actually is a good point and I was also thinking about it when submitting the PR to fix that database error.

Might instead be better to have a default value that gets assigned if no avatar is provided.

Report
1