theforeman/foreman — pull request #94 by Telmo (2012-06-28 22:50:46+00:00)
Title: Fix for mysql2 migration issue

This time the right commit :(

RAILS_ENV=production bundle exec rake db:migrate

fails with :

<--- snip -->

== CreateMessages: migrating =================================================
-- create_table(:messages)
-> 0.0024s
-- add_index(:messages, :value)
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: BLOB/TEXT column 'value' used in key specification without a key length: CREATE INDEX `index_messages_on_value` ON `messages` (`value`)

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

also fails on CreateSources:

== CreateSources: migrating ==================================================
-- create_table(:sources)
-> 0.0025s
-- add_index(:sources, :value)
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: BLOB/TEXT column 'value' used in key specification without a key length: CREATE INDEX `index_sources_on_value` ON `sources` (`value`)

Tasks: TOP => db:migrate
(See full trace by running task with --trace)