Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295674

Impossible to create datetime fields with default value of 'now()' using schema-api

$
0
0

It's not possible to create tables with datetime fields using the schema api if you want to have a default value of now() or current_timestamp. This happens because all strings are escaped with ' before going to the database. Database function calls like now() do not work if escaped. The attached patch allows now() to be used for datetime fields.


Viewing all articles
Browse latest Browse all 295674


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>