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:
commit
69c6513616
3 changed files with 8 additions and 4 deletions
|
@ -101,6 +101,10 @@ module ActiveRecord
|
|||
@visitor = nil
|
||||
end
|
||||
|
||||
def valid_type?(type)
|
||||
true
|
||||
end
|
||||
|
||||
class SchemaCreation
|
||||
def initialize(conn)
|
||||
@conn = conn
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue