diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-01-16 03:54:15 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-01-16 03:54:15 +0000 |
commit | 61e550ade937f812546b6fe561bc5ceb4460b9fb (patch) | |
tree | 41e48bceb97c612a694ec91cbbaa089c71e1b1d9 /activerecord/test | |
parent | b812b236876ab7a6bd1f3e58a1aa71847394f3a1 (diff) | |
download | rails-61e550ade937f812546b6fe561bc5ceb4460b9fb.tar.gz rails-61e550ade937f812546b6fe561bc5ceb4460b9fb.tar.bz2 rails-61e550ade937f812546b6fe561bc5ceb4460b9fb.zip |
Don't ignore :precision and :scale when adding columns on postgresql. Closes #6868 [w.piekutowski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/migration_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb index f2683f3aef..f98f094fea 100644 --- a/activerecord/test/migration_test.rb +++ b/activerecord/test/migration_test.rb @@ -268,6 +268,15 @@ if ActiveRecord::Base.connection.supports_migrations? Person.reset_column_information end + def test_add_column_with_precision_and_scale + Person.connection.add_column 'people', 'wealth', :decimal, :precision => 9, :scale => 7 + Person.reset_column_information + + wealth_column = Person.columns_hash['wealth'] + assert_equal 9, wealth_column.precision + assert_equal 7, wealth_column.scale + end + def test_native_types Person.delete_all Person.connection.add_column "people", "last_name", :string |