Hi! I'm new to Haskell and I'm really impressed by the modelling power of discriminating unions. Fex a zapier clone might do something like this
Zap = new Record {id, trigger, actions}
data trigger = timerTrigger | httpTriger ... etc
However, how does people go about modelling sum types in postgres? I cant find any examples. Is it usually not done?
Based on your example, it might be that enums could work for you here:
https://ihp.digitallyinduced.com/Guide/database.html#enums