# Rspec & table type MyISAM

**URL:** <https://www.ruby-forum.com/t/rspec-table-type-myisam/129002>\
**Category:** Rails\
**Created:** [February 13, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/rspec-table-type-myisam/129002 "2008-02-13T14:09:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thorsten](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Post date:** [February 13, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/rspec-table-type-myisam/129002/1 "2008-02-13T14:09:34Z")

</div>

i’m using a table, that uses fulltext search and therefore the table  
type MyISAM  
everything works fine in production mode, but tests fail with

ActiveRecord::StatementInvalid: Mysql::Error: The used table type  
doesn’t support FULLTEXT indexes

when looking in the test db it’s clear, that it’s using InnoDB, but even  
manually changing the table type does not help, since it’s created new  
for every test run

(we use rspec, but it’s the same for normal test)

migration:

create\_table :pages, :options =\> “engine=MyISAM” do |t|  
…  
end

should work that way and does in development mode…

---

<div class="post-metadata">

**Author:** ![thorsten](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Post date:** [February 13, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/rspec-table-type-myisam/129002/2 "2008-02-13T14:36:54Z")

</div>

On 13 Feb 2008, at 13:09, Thorsten M. wrote:

> manually changing the table type does not help, since it’s created new  
> for every test run
> 
> (we use rspec, but it’s the same for normal test)
> 
> migration:
> 
> create\_table :pages, :options =\> “engine=MyISAM” do |t|  
> …  
> end

Are you using the ruby schema dumped? it doesn’t support options like  
that IIRC (you can turn this on/off in environment.rb)

---

<div class="post-metadata">

**Author:** ![thorsten](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Post date:** [February 13, 2008, 2:40pm UTC](https://www.ruby-forum.com/t/rspec-table-type-myisam/129002/3 "2008-02-13T14:40:50Z")

</div>

> Are you using the ruby schema dumped? it doesn’t support options like  
> that IIRC (you can turn this on/off in environment.rb)

yep, that was it!

thanks a lot
