Permalink
Browse files

Correct fix for [8647], Closes #6868. [isak]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
NZKoz committed Jan 16, 2008
1 parent 47ff3aa commit 3b9bcf13f9589423947a7d9598545e3ce8c3fb44
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -594,7 +594,7 @@ def add_column(table_name, column_name, type, options = {})
notnull = options[:null] == false
# Add the column.
- execute("ALTER TABLE #{quote_table_name(table_name)} ADD COLUMN #{quoted_column_name} #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}")
+ 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])}")
change_column_default(table_name, column_name, default) if options_include_default?(options)
change_column_null(table_name, column_name, false, default) if notnull

0 comments on commit 3b9bcf1

Please sign in to comment.