diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-02-10 16:31:18 +0900 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2017-02-10 15:02:35 -0700 |
commit | 6401e03ef6285a93588a162e651e0b15fcb60a19 (patch) | |
tree | 425bf3587a036b924d43202c21a1ac5983630a50 /activerecord/lib | |
parent | c92520077cb8020c4582177715f6c35e98de2e5f (diff) | |
download | rails-6401e03ef6285a93588a162e651e0b15fcb60a19.tar.gz rails-6401e03ef6285a93588a162e651e0b15fcb60a19.tar.bz2 rails-6401e03ef6285a93588a162e651e0b15fcb60a19.zip |
Fix bigint primary key with unsigned
Currently schema dumper lost the unsigned option when primary key is
defined as bigint with unsigned. This commit fixes the issue.
Closes #27960
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb index a06dd0f6b8..ad4a069d73 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_dumper.rb @@ -22,7 +22,7 @@ module ActiveRecord private def default_primary_key?(column) - super && column.auto_increment? + super && column.auto_increment? && !column.unsigned? end def explicit_primary_key_default?(column) |