diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-09-13 16:45:52 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-09-16 13:50:00 +0900 |
commit | f7a35cc5cfb1f970cdea58fb9b47e06c57f532f9 (patch) | |
tree | 67fed67e78d69821f77d91fd1c2c27d3edc248a3 /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | |
parent | 93181210234411b9a918cca481422eabebe5400e (diff) | |
download | rails-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/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 16aefc94ab..c09e7a55e0 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -158,7 +158,7 @@ module ActiveRecord # generates: # # CREATE TABLE suppliers ( - # id int(11) auto_increment PRIMARY KEY + # id int auto_increment PRIMARY KEY # ) ENGINE=InnoDB DEFAULT CHARSET=utf8 # # ====== Rename the primary key column @@ -170,7 +170,7 @@ module ActiveRecord # generates: # # CREATE TABLE objects ( - # guid int(11) auto_increment PRIMARY KEY, + # guid int auto_increment PRIMARY KEY, # name varchar(80) # ) # @@ -320,7 +320,7 @@ module ActiveRecord # [<tt>:bulk</tt>] # Set this to true to make this a bulk alter query, such as # - # ALTER TABLE `users` ADD COLUMN age INT(11), ADD COLUMN birthdate DATETIME ... + # ALTER TABLE `users` ADD COLUMN age INT, ADD COLUMN birthdate DATETIME ... # # Defaults to false. # |