I'm still new to supabase and backend in general so need a bit of guidance. I created a "profiles" table with row level security on the supabase dashboard. I have a function that is triggered when a new user signs up to populate the profile table with the email, display_name, terms_accepted and the default created_at and id data.
Now the issue is everything works fine and a user is created if the terms_accepted column is set as data type of text. And I need it to be a boolean. Whenever I edit the profile table column of terms_accepted to be anything other than a text, I get this error - Failed to create user: Database error creating new user
.
I've been on this for hours and can't seem to pinpoint where exactly I went wrong considering everything works fine if the newly added column is a text type. Any other data type and I am not able to register a new user both from my client app or on the supabase dashboard. Any help is greatly appreciated.
This is my profile table columns set-up
This is my function that is triggered during sign up
Let me know if you need any more information and I'd be happy to provide.