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/test/cases/schema_dumper_test.rb | |
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/test/cases/schema_dumper_test.rb')
-rw-r--r-- | activerecord/test/cases/schema_dumper_test.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index f79c3f0c3d..1c43e3c5b5 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -45,7 +45,7 @@ class SchemaDumperTest < ActiveRecord::TestCase next if column_set.empty? lengths = column_set.map do |column| - if match = column.match(/t\.(?:integer|decimal|float|datetime|timestamp|time|date|text|binary|string|boolean|primary_key)\s+"/) + if match = column.match(/t\.(?:integer|decimal|float|datetime|timestamp|time|date|text|binary|string|boolean)\s+"/) match[0].length end end @@ -186,13 +186,6 @@ class SchemaDumperTest < ActiveRecord::TestCase assert_match %r{t.text\s+"medium_text",\s+:limit => 16777215$}, output assert_match %r{t.text\s+"long_text",\s+:limit => 2147483647$}, output end - - def test_mysql_schema_dump_should_honor_primary_keys_limits - output = standard_dump - match = output.match(%r{create_table "primary_key_limit",.*?:id => false\b.*? do (.*?)\bend$}m) - assert_not_nil(match, output) - assert_match %r(t.primary_key\s+"id",\s+:limit => \d+$), match[1], "limit option not found on primary key" - end end def test_schema_dump_includes_decimal_options @@ -218,7 +211,7 @@ class SchemaDumperTest < ActiveRecord::TestCase if current_adapter?(:OracleAdapter) assert_match %r{t.integer\s+"atoms_in_universe",\s+:precision => 38,\s+:scale => 0}, output else - assert_match %r{t.decimal\s+"atoms_in_universe",\s+:limit => 55,\s+:precision => 55,\s+:scale => 0}, output + assert_match %r{t.decimal\s+"atoms_in_universe",\s+:precision => 55,\s+:scale => 0}, output end end |