1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #9984 from ranjaykrishna/col-prob

valid_type? added to super class abstract_adapter
This commit is contained in:
Rafael Mendonça França 2013-03-28 12:01:46 -07:00
commit 69c6513616
3 changed files with 8 additions and 4 deletions

View file

@ -101,6 +101,10 @@ module ActiveRecord
@visitor = nil
end
def valid_type?(type)
true
end
class SchemaCreation
def initialize(conn)
@conn = conn

View file

@ -499,10 +499,6 @@ module ActiveRecord
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)

View file

@ -30,6 +30,10 @@ module ActiveRecord
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