preaction / Yancy

The Best Web Framework Deserves the Best Content Management System
http://preaction.me/yancy/
Other
54 stars 21 forks source link

ignoring column defaults of db which are function calls issue #124 #144

Open rmallah opened 1 year ago

rmallah commented 1 year ago

currently read_schema returns the default values of db in verbatim even if they are function calls. This causes attempts to insert the function call body as defaults in columns instead of the the value, which does not makes sense. The current fix returns undef for such column defaults. Additionally as a measure of caution it does not do the above in case the default has been handled in fix_default mapping.