This project is archived and is in readonly mode.
Schema dump does not honor Sub_Part column
Reported by Ryan Mulligan | August 7th, 2008 @ 11:03 PM | in 2.x
Indexing some fields (text, blob) requires a SubPart field to be set in the Index table. Unfortunately rake db:schema:dump ignores this field and creates a simple addindex in the schema. When the test database tries to use a simple index, it fails because MySQL requires the Sub_part be set.
My recommended fix is to include an extra option in the addindex command to include Subparts.
example of error failing (name is a text field):
ryan@rtmlap:~/bs$ rake test:units
(in /home/ryan/bs)
rake aborted!
Mysql::Error: BLOB/TEXT column 'name' used in key specification without a key length: CREATE INDEX taggings
ON tags
(id
, name
)
Expected index creation to be:
CREATE INDEX taggings
ON tags
(id
, name
(30))
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 07:48 PM
- State changed from new to stale
Staling out, please let me know if it is still an issue.
-
Denis January 24th, 2009 @ 01:55 AM
In 2.1.0, at least, it is still an issue. I'll try to check 2.2.2 sometime soon.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>