Actions
Bug #2264
closedschema.rb invalid for MySQL, fails creating index on sources.value TEXT column
Description
On MySQL, the sources table gets created with a full text index in the 20101018120603_create_sources.rb migration:
CreateSources: migrating ==================================================
-- create_table(:sources)
> 0.2536s
- execute("ALTER TABLE sources ENGINE = MYISAM")
> 0.1248s
- execute("ALTER TABLE sources ADD FULLTEXT (value)")
-> 0.0606s
CreateSources: migrated (0.4396s) =========================================
db/schema.rb gets written out as:
create_table "sources", :force => true do |t|
t.text "value"
end
add_index "sources", ["value"], :name => "value"
However when this is run as part of loading test fixtures, it fails as it doesn't create a full text index:
CREATE TABLE `sources` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `value` text) ENGINE=InnoDB
CREATE INDEX `value` ON `sources` (`value`)^[[0m
Mysql::Error: BLOB/TEXT column 'value' used in key specification without a key length: CREATE INDEX `value` ON `sources` (`value`)
I'd suggest the same fix used for #2126 is applied to sources, or change it to use a SQL schema.
Updated by Dominic Cleal almost 12 years ago
- Status changed from Assigned to Ready For Testing
Updated by Dominic Cleal almost 12 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset bf38fd07f855b2018916a4d1cbe850d65dca7ba3.
Updated by Dominic Cleal almost 9 years ago
- Has duplicate Bug #1614: SQL index on sources.value column added
Updated by The Foreman Bot almost 7 years ago
- Description updated (diff)
- Pull request https://github.com/theforeman/foreman/pull/5153 added
Updated by Anonymous almost 7 years ago
- Pull request deleted (
https://github.com/theforeman/foreman/pull/5153)
Actions