diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-27 14:38:48 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-27 14:39:43 +0100 |
commit | ff522cf4bcb31420baee62aa3c24c98959d80cdf (patch) | |
tree | da338f03cfe462e30eb1eb9708b527506707f4e4 /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 46b7704b7469a1359f5d5fd79f312b1d4761dcdf (diff) | |
download | rails-ff522cf4bcb31420baee62aa3c24c98959d80cdf.tar.gz rails-ff522cf4bcb31420baee62aa3c24c98959d80cdf.tar.bz2 rails-ff522cf4bcb31420baee62aa3c24c98959d80cdf.zip |
Revert "primary_key now supports :limit for MySQL". Break Sam Ruby app.
To reproduce, start a new application, create a scaffold and run test suite. [#876 state:open]
This reverts commit faeca694b3d4afebf6b623b493e86731e773c462.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index 5e29baf51f..64faaef4a0 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -274,7 +274,7 @@ module ActiveRecord column_options = {} column_options[:null] = null unless null.nil? column_options[:default] = default unless default.nil? - add_column_options!(column_sql, column_options) + add_column_options!(column_sql, column_options) unless type.to_sym == :primary_key column_sql end @@ -334,8 +334,8 @@ module ActiveRecord # Appends a primary key definition to the table definition. # Can be called multiple times, but this is probably not a good idea. - def primary_key(name, options = {}) - column(name, :primary_key, options) + def primary_key(name) + column(name, :primary_key) end # Returns a ColumnDefinition for the column with name +name+. @@ -357,7 +357,7 @@ module ActiveRecord # # Available options are (none of these exists by default): # * <tt>:limit</tt> - - # Requests a maximum column length. This is number of characters for <tt>:string</tt> and <tt>:text</tt> columns and number of bytes for :binary, :integer and :primary_key columns. + # Requests a maximum column length. This is number of characters for <tt>:string</tt> and <tt>:text</tt> columns and number of bytes for :binary and :integer columns. # * <tt>:default</tt> - # The column's default value. Use nil for NULL. # * <tt>:null</tt> - |