Permalink
Browse files

Postgres can't cast boolean to integer.

  • Loading branch information...
1 parent c674666 commit 5eddb764d2da03f3631ccac98f831f928a2a9f37 @oggy committed Jun 27, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 test/unit/db_nazi/test_abstract_adapter.rb
  2. +2 −2 test/unit/db_nazi/test_table.rb
@@ -69,8 +69,8 @@
end
it "still changes the column if ok" do
- connection.change_column 'test_table', 'test_column', :integer, null: false
- connection.column_exists?('test_table', 'test_column', :integer, null: false).must_equal true
+ connection.change_column 'test_table', 'test_column', :boolean, null: true
+ connection.column_exists?('test_table', 'test_column', :boolean, null: true).must_equal true
end
describe "when nullability is required" do
@@ -140,9 +140,9 @@
it "still changes the column if ok" do
connection.change_table 'test_table', bulk: true do |t|
- t.change 'test_column', :integer, null: true
+ t.change 'test_column', :boolean, null: false, default: false
end
- connection.column_exists?('test_table', 'test_column', :integer, null: true).must_equal true
+ connection.column_exists?('test_table', 'test_column', :boolean, null: false, default: false).must_equal true
end
describe "when nullability is required" do

0 comments on commit 5eddb76

Please sign in to comment.