From 6401e03ef6285a93588a162e651e0b15fcb60a19 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 10 Feb 2017 16:31:18 +0900 Subject: 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 --- .../lib/active_record/connection_adapters/mysql/schema_dumper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') 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) -- cgit v1.2.3