Dump the default function when the primary key is uuid

Fixes #12489
Push default_function to superclass to avoid method check
Extract a function to determine if the default value is a function