Skip to content

Comments

Support Different Engines for Different Tables; Support MyISAM FULLTEXT indexes#8239

Closed
kenmazaika wants to merge 1 commit intorails:masterfrom
where:MyISAM-fulltext-indexes
Closed

Support Different Engines for Different Tables; Support MyISAM FULLTEXT indexes#8239
kenmazaika wants to merge 1 commit intorails:masterfrom
where:MyISAM-fulltext-indexes

Conversation

@kenmazaika
Copy link
Contributor

Add support for different MySQL engines for different tables; Add support for MyISAM fulltext indexes in migrations, and schema.rb.

In a project I was working on we wanted to use MyISAM fulltext indexes for a single table, but continue to use InnoDB for the remaining tables. This patch adds support for that. Without this patch it's impossible to use the full-text search query syntax, because in the test database it would continue to use the default engine for all, and not add the fulltext option to the index that is create (just a standard key would be created, which isn't what we needed).

  • When dumping the schema to schema.rb, include engine information, and add a flag for fulltext indexes.
  • When engine and fulltext index flags are in the migration, create the index as a fulltext one.

Sources:

Integrated: multiple engine support from this gist

…port for MyISAM fulltext indexes in migrations, and schema.rb.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is better to add a :fulltext attribute

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is better to leave this as :options since we have the SPACIAL indexes too.

@rafaelfranca
Copy link
Member

We will need tests. Also I would only add support for the full text indexes in this pull request and open a new one to add support to MyISAM

@rafaelfranca
Copy link
Member

Also this is related with #6101

@rafaelfranca
Copy link
Member

@rafaelfranca
Copy link
Member

Thank you so much for the pull request

@kenmazaika
Copy link
Contributor Author

@rafaelfranca thanks for reviewing this so quickly. Closing this pull request now, I'll open 2 separate ones with the changes you suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants