search for: cur_default

Displaying 1 result from an estimated 1 matches for "cur_default".

2006 Sep 27
0
MySQL and Default values
...class Base class << self alias db_columns :columns def columns db_columns.collect do |c| c.instance_variable_set ''@default'', default_for(c.name, c.default) c end end def default_for(field, cur_default) cur_default end end end end This code will try to guess what the developer meant only if we are running MySQL < 5.0.2. It makes a special exception if the field is "lock_version" since this is commonly an integer with a default of 0. In addition I have a ho...