Migration failed "Mysql2::Error: Incorrect key file for table"

Hello,

I am trying to run a migration on a db that has about 100K records. When
I
run the migration I get this error

== 20160503165700 AddDetailsToTransactions: migrating

– add_column(:transactions, :invoice_number, :string)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Incorrect key file for table ‘transactions’; try to
repair it
: ALTER TABLE transactions ADD invoice_number
varchar(255)/home/…/
gems/activerecord-4.1.7/lib/active_record/connection_adapters/
abstract_mysql_adapter.rb:303:in query' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4. 1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:inblock
in execute’
/home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.
1.7/lib/active_record/connection_adapters/abstract_adapter.rb:373:in
block in log' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activesupport-4.1.7/lib/ active_support/notifications/instrumenter.rb:20:ininstrument’
/home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.
1.7/lib/active_record/connection_adapters/abstract_adapter.rb:367:in
log' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4. 1.7/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:inexecute’
/home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.1.7/lib/
active_record/connection_adapters/mysql2_adapter.rb:228:in execute' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4. 1.7/lib/active_record/connection_adapters/abstract/schema_statements.rb:375:inadd_column’
/home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.
1.7/lib/active_record/migration.rb:649:in block in method_missing' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.1.7/lib/ active_record/migration.rb:621:inblock in say_with_time’
/home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4.
1.7/lib/active_record/migration.rb:621:in say_with_time' /home/deploy/.rvm/gems/ruby-2.1.4@terga/gems/activerecord-4. 1.7/lib/active_record/migration.rb:641:inmethod_missing’
/var/www/…/db/migrate/20160503165700_add_details_to_transactions.rb
:3:in `change’

I thought at first it was a memory issue and spun up a larger server but
it
still failed.

Cheers,

Mendel