Displaying 1 result from an estimated 1 matches for "default_fix".
Did you mean:
default_fb
2006 Apr 25
0
Migrate default now()
...5837''::timestamp without time zone
Modify to:
t.column :created_at, :timestamp, :null => false, :default =>
''current_timestamp''
It is converted to:
created_at timestamp NOT NULL DEFAULT ''current_timestamp''
It''s wrong.
I try to fixed it:
default_fix.rb:
module ActiveRecord
module ConnectionAdapters # :nodoc:
module SchemaStatements
def add_column_options!(sql, options) #:nodoc:
unless options[:default].nil?
if options[:default] == "now"
sql << " DEFAULT #{now(options[:default], opt...