diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-16 21:56:45 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-16 21:56:45 +0000 |
commit | 3b9bcf13f9589423947a7d9598545e3ce8c3fb44 (patch) | |
tree | 34390f7b011d231f00b75fdf4f98c8f34a68e6fe | |
parent | 47ff3aa91ff23ae8676717519fe0aecd1f6a7d82 (diff) | |
download | rails-3b9bcf13f9589423947a7d9598545e3ce8c3fb44.tar.gz rails-3b9bcf13f9589423947a7d9598545e3ce8c3fb44.tar.bz2 rails-3b9bcf13f9589423947a7d9598545e3ce8c3fb44.zip |
Correct fix for [8647], Closes #6868. [isak]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 6b2e5d21c4..cf5211e514 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -594,7 +594,7 @@ module ActiveRecord 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 |