Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Schema dump does not honor Sub_Part column

#779

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))

Reported by Ryan Mulligan · August 7th, 2008 @ 11:03 PM

State: stale
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to stale

    Staling out, please let me know if it is still an issue.

    November 22nd, 2008 @ 07:48 PM

  2. Denis
    Denis

    In 2.1.0, at least, it is still an issue. I'll try to check 2.2.2 sometime soon.

    January 24th, 2009 @ 01:55 AM

  3. Chris Hapgood
    Chris Hapgood

    Still a problem in 2.3.3

    August 10th, 2009 @ 11:06 PM