Permalink
Browse files

Revert "checking in the abstractions for valid type checking:"

This reverts commit c321b30.

Conflicts:
	activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
	activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb

Reason: failing test

  1) Error:
test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest):
NoMethodError: undefined method `column' for
    test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in
`test_valid_column'
  • Loading branch information...
1 parent 2f99779 commit c65b076328b292f1b727bb6a7dc144c05458163f @jonleighton jonleighton committed Feb 15, 2013
@@ -118,7 +118,7 @@ def table(table, stream)
# then dump all non-primary key columns
column_specs = columns.map do |column|
- raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type)
+ raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" if @types[column.type].nil?
next if column.name == pk
@connection.column_spec(column, @types)
end.compact
@@ -16,15 +16,6 @@ def setup
eosql
end
- def test_valid_column
- column = @conn.column('ex').find { |col| col.name == 'id' }
- assert @conn.valid_type?(column.type)
- end
-
- def test_invalid_column
- assert !@conn.valid_type?(:foobar)
- end
-
def test_client_encoding
assert_equal Encoding::UTF_8, @conn.client_encoding
end
@@ -10,15 +10,6 @@ def setup
@connection.exec_query('create table ex(id serial primary key, number integer, data character varying(255))')
end
- def test_valid_column
- column = @connection.column('ex').find { |col| col.name == 'id' }
- assert @connection.valid_type?(column.type)
- end
-
- def test_invalid_column
- assert !@connection.valid_type?(:foobar)
- end
-
def test_primary_key
assert_equal 'id', @connection.primary_key('ex')
end
@@ -25,15 +25,6 @@ def setup
@conn.intercepted = true
end
- def test_valid_column
- column = @conn.column('items').find { |col| col.name == 'id' }
- assert @conn.valid_type?(column.type)
- end
-
- def test_invalid_column
- assert @conn.valid_type?(:foobar)
- end
-
def teardown
@conn.intercepted = false
@conn.logged = []

0 comments on commit c65b076

Please sign in to comment.