Only insert nullable column if not null
I'm inserting a row into my threads table and I want to only include a reference to the categories table if the user selects a category.
I'd like to be able to just insert as usual (
I'd like to be able to just insert as usual (
{category_id: category} and if category is null, the column stays null. The issue is I get an error stating that it cannot be inserted as a uuid. Thoughts?