aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorPaul Sadauskas <psadauskas@gmail.com>2012-01-24 14:22:24 -0700
committerPaul Sadauskas <psadauskas@gmail.com>2012-01-24 14:22:24 -0700
commit6cde635f34dc65a8c6f2d87ca995120fcf0ea25f (patch)
treec46887a9d311bb834cd74067581517e1a52ae2d2 /activesupport/test
parentb1f8ba138360cd67994d4134f57abca74f8528bc (diff)
downloadrails-6cde635f34dc65a8c6f2d87ca995120fcf0ea25f.tar.gz
rails-6cde635f34dc65a8c6f2d87ca995120fcf0ea25f.tar.bz2
rails-6cde635f34dc65a8c6f2d87ca995120fcf0ea25f.zip
Handle nil in add_index :length option in MySQL
Our schema.rb is being generated with an `add_index` line similar to this: add_index "foo", ["foo", "bar"], :name => "xxx", :length => {"foo"=>8, "bar=>nil} This is the same as it was on Rails 3.1.3, however, now when that schema.rb is evaluated, its generating bad SQL in MySQL: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1: CREATE UNIQUE INDEX `xxx` ON `foo` (`foo`(8), `bar`()) This commit adds a check for nil on the length attribute to prevent the empty parens from being output.
Diffstat (limited to 'activesupport/test')
0 files changed, 0 insertions, 0 deletions