Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6868: fix_8647.diff

File fix_8647.diff, 1.0 kB (added by isak, 9 months ago)
  • a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb

    old new  
    594594        notnull = options[:null] == false 
    595595 
    596596        # Add the column. 
    597         execute("ALTER TABLE #{quote_table_name(table_name)} ADD COLUMN #{quoted_column_name} #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}") 
     597        execute("ALTER TABLE #{quote_table_name(table_name)} ADD COLUMN #{quote_column_name(column_name)} #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}") 
    598598 
    599599        change_column_default(table_name, column_name, default) if options_include_default?(options) 
    600600        change_column_null(table_name, column_name, false, default) if notnull