mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
c4d85dfbc7
commit
d0054b4908
3 changed files with 7 additions and 2 deletions
|
@ -30,7 +30,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def bigint?
|
||||
/bigint/ === sql_type
|
||||
/\Abigint\b/ === sql_type
|
||||
end
|
||||
|
||||
# Returns the human name of the column name.
|
||||
|
|
|
@ -18,4 +18,9 @@ class Mysql2EnumTest < ActiveRecord::Mysql2TestCase
|
|||
column = EnumTest.columns_hash['enum_column']
|
||||
assert_not column.unsigned?
|
||||
end
|
||||
|
||||
def test_should_not_be_bigint
|
||||
column = EnumTest.columns_hash['enum_column']
|
||||
assert_not column.bigint?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -62,7 +62,7 @@ SQL
|
|||
|
||||
ActiveRecord::Base.connection.execute <<-SQL
|
||||
CREATE TABLE enum_tests (
|
||||
enum_column ENUM('text','blob','tiny','medium','long','unsigned')
|
||||
enum_column ENUM('text','blob','tiny','medium','long','unsigned','bigint')
|
||||
)
|
||||
SQL
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue