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:in 
`block 
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:in `instrument'
/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:in 
`execute'
/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:in 
`add_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:in `block 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:in `method_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

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d310485f-8935-43f1-8392-aa58125ea72f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to