aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2015-09-13 16:45:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2015-09-16 13:50:00 +0900
commitf7a35cc5cfb1f970cdea58fb9b47e06c57f532f9 (patch)
tree67fed67e78d69821f77d91fd1c2c27d3edc248a3 /activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
parent93181210234411b9a918cca481422eabebe5400e (diff)
downloadrails-f7a35cc5cfb1f970cdea58fb9b47e06c57f532f9.tar.gz
rails-f7a35cc5cfb1f970cdea58fb9b47e06c57f532f9.tar.bz2
rails-f7a35cc5cfb1f970cdea58fb9b47e06c57f532f9.zip
Remove unnecessary display width
The **(11)** does not affect the storage size of the data type, which for an INT will always be 4 bytes. It affects the **display width**. http://www.tocker.ca/2015/07/02/proposal-to-deprecate-mysql-integer-display-width-and-zerofill.html
Diffstat (limited to 'activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb b/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
index b804cb45b9..631e1752c4 100644
--- a/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
+++ b/activerecord/test/cases/adapters/mysql/mysql_adapter_test.rb
@@ -83,7 +83,7 @@ module ActiveRecord
end
def test_pk_and_sequence_for_with_non_standard_primary_key
- with_example_table '`code` INT(11) auto_increment, PRIMARY KEY (`code`)' do
+ with_example_table '`code` INT auto_increment, PRIMARY KEY (`code`)' do
pk, seq = @conn.pk_and_sequence_for('ex')
assert_equal 'code', pk
assert_equal @conn.default_sequence_name('ex', 'code'), seq
@@ -91,7 +91,7 @@ module ActiveRecord
end
def test_pk_and_sequence_for_with_custom_index_type_pk
- with_example_table '`id` INT(11) auto_increment, PRIMARY KEY USING BTREE (`id`)' do
+ with_example_table '`id` INT auto_increment, PRIMARY KEY USING BTREE (`id`)' do
pk, seq = @conn.pk_and_sequence_for('ex')
assert_equal 'id', pk
assert_equal @conn.default_sequence_name('ex', 'id'), seq
@@ -99,7 +99,7 @@ module ActiveRecord
end
def test_composite_primary_key
- with_example_table '`id` INT(11), `number` INT(11), foo INT(11), PRIMARY KEY (`id`, `number`)' do
+ with_example_table '`id` INT, `number` INT, foo INT, PRIMARY KEY (`id`, `number`)' do
assert_nil @conn.primary_key('ex')
end
end
@@ -141,7 +141,7 @@ module ActiveRecord
def with_example_table(definition = nil, &block)
definition ||= <<-SQL
- `id` int(11) auto_increment PRIMARY KEY,
+ `id` int auto_increment PRIMARY KEY,
`number` integer,
`data` varchar(255)
SQL