diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2016-12-17 13:06:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-17 13:06:51 -0500 |
commit | 5b37c9c4a6d823ea210e46ad5f57b1a437243e7d (patch) | |
tree | 6db3f3e7680c6ee07bf11c512c1af47c0d4c3a21 /activerecord/lib | |
parent | a8a062cbc4c8ee9cb01d8979f1ade9c7c6ebe259 (diff) | |
parent | 61cd7bd65314fe53e42593875a7425385c596740 (diff) | |
download | rails-5b37c9c4a6d823ea210e46ad5f57b1a437243e7d.tar.gz rails-5b37c9c4a6d823ea210e46ad5f57b1a437243e7d.tar.bz2 rails-5b37c9c4a6d823ea210e46ad5f57b1a437243e7d.zip |
Merge pull request #27329 from kamipo/simplify_unsigned_regex
Simplify the regex for `unsigned?` method
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql/column.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/column.rb b/activerecord/lib/active_record/connection_adapters/mysql/column.rb index c66d543752..1499c1681f 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/column.rb @@ -5,8 +5,7 @@ module ActiveRecord delegate :extra, to: :sql_type_metadata, allow_nil: true def unsigned? - # enum and set types do not allow being defined as unsigned. - !/\A(?:enum|set)\b/.match?(sql_type) && /\bunsigned\b/.match?(sql_type) + /\bunsigned(?: zerofill)?\z/.match?(sql_type) end def case_sensitive? |