You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a couple scenarios where allowing the use of a raw string to be used as a default would be useful. For example to call an unsupported function, like generate_uuid_v4() or to specify a default for a specific type, i.e. '{}'::jsonb as a default for a JSONB column.
Would it make sense to support passing a 'raw' string that wouldn't be escaped when generating the default expression?
The text was updated successfully, but these errors were encountered:
Hi @jpulec,
Interesting suggestion, I like it. It would definitely be useful to have this kind of support somehow.
For the '{}'::jsonb case, a cool solution would be to introspect the models, and determine how to interpret AddDefaultValue.value depending on the Field class that is used for the targeted field :)
I've run into a couple scenarios where allowing the use of a raw string to be used as a default would be useful. For example to call an unsupported function, like
generate_uuid_v4()
or to specify a default for a specific type, i.e.'{}'::jsonb
as a default for a JSONB column.Would it make sense to support passing a 'raw' string that wouldn't be escaped when generating the default expression?
The text was updated successfully, but these errors were encountered: