Generated Postgres Column adding together other columns that may have null values
This code works until one of the numeric values is null, then the totalQuantity becomes null as well. Is there a way to do this in a drizzle schema that would account for the potential nulls?
Solution
Want to try something. In the
generated always as expression, remove the table name before each column name ("supply_item"."location1_quantity" -> "location1_quantity")