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 594 594 notnull = options[:null] == false 595 595 596 596 # Add the column. 597 execute("ALTER TABLE #{quote_table_name(table_name)} ADD COLUMN #{quote d_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])}") 598 598 599 599 change_column_default(table_name, column_name, default) if options_include_default?(options) 600 600 change_column_null(table_name, column_name, false, default) if notnull