Permalink
Browse files

Merge pull request #9984 from ranjaykrishna/col-prob

valid_type? added to super class abstract_adapter
  • Loading branch information...
rafaelfranca committed Mar 28, 2013
2 parents 0639d95 + 7c5e003 commit 69c6513616bf92d5d73867a201bf92dc39ec4a07
@@ -101,6 +101,10 @@ def initialize(connection, logger = nil, pool = nil) #:nodoc:
@visitor = nil
end
+ def valid_type?(type)
+ true
+ end
+
class SchemaCreation
def initialize(conn)
@conn = conn
@@ -499,10 +499,6 @@ def rename_column(table_name, column_name, new_column_name) #:nodoc:
rename_column_indexes(table_name, column_name, new_column_name)
end
- def valid_type?(type)
- true
- end
-
protected
def select(sql, name = nil, binds = []) #:nodoc:
exec_query(sql, name, binds)
@@ -30,6 +30,10 @@ def test_valid_column
assert @conn.valid_type?(column.type)
end
+ # sqlite databses should be able to support any type and not
+ # just the ones mentioned in the native_database_types.
+ # Therefore test_invalid column should always return true
+ # even if the type is not valid.
def test_invalid_column
assert @conn.valid_type?(:foobar)
end

0 comments on commit 69c6513

Please sign in to comment.