提交 b789f6df 编写于 作者: R Rafael França

Merge pull request #23355 from kamipo/fix_bigint_for_enum_columns

Fix `bigint?` for Enum columns in MySQL
......@@ -30,7 +30,7 @@ def has_default?
end
def bigint?
/bigint/ === sql_type
/\Abigint\b/ === sql_type
end
# Returns the human name of the column name.
......
......@@ -18,4 +18,9 @@ def test_should_not_be_unsigned
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 @@
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册