table_migrator icon indicating copy to clipboard operation
table_migrator copied to clipboard

Rails 3 support?

Open wakiki opened this issue 15 years ago • 4 comments

This plugin doesn't seem to work with the Mysql2 adapter in Rails 3 - is there any plans to support rails 3?

http://pastie.org/private/7sxwkcchihtpunkhwdu7lw

Steve

wakiki avatar Sep 17 '10 13:09 wakiki

I'd love to support rails 3, and will add support when I get around to it, but I can't make any guarantees as to when. Feel free to submit a patch, though!

freels avatar Sep 17 '10 18:09 freels

OK I'll have a go.

There's this thing called 'renames' which seems a bit odd though - do you know where I can find more information about it?

http://pastie.org/private/hlmz7ktcavgzwnymwmf6w

Note 'renames' returns:

renames => {"[:foo]"=>nil, "title"=>"totle"}

Wierd formatting of foo... do you know if this is intentional or am I going to have to write some ugly hack to interpolate that string?

wakiki avatar Sep 17 '10 19:09 wakiki

OK well I've patched it and just got it to do a migration on 6 million rows of data so it looks good.

http://github.com/wakiki/table_migrator

I can't seem to run the tests for some reason so can't test it... but then the test suite isn't that extensive anyways it seems.

(in /Users/Steve/work/swom/vendor/plugins/table_migrator) /Users/Steve/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -I"lib:lib" "/Users/Steve/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/migration_strategy_test.rb" test/unit/migration_strategy_test.rb:7:in <class:MigrationStrategyTest>': uninitialized constant TableMigrator::MigrationStrategy (NameError) from test/unit/migration_strategy_test.rb:6:in<top (required)>' from /Users/Steve/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in load' from /Users/Steve/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:inblock in

' from /Users/Steve/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in each' from /Users/Steve/.rvm/gems/ruby-1.9.2-p0@rails3/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in
' rake aborted! Command failed with status (1): [/Users/Steve/.rvm/rubies/ruby-1.9.2-p0/bin...]

wakiki avatar Sep 17 '10 20:09 wakiki

Hi, has there been any update re. Rails 3 support? I've done my best to patch it (see my branch at http://github.com/wakiki/table_migrator) but I don't know mysql well enough (it works though for me - it'd be nice to have official support...)

wakiki avatar Oct 18 '10 11:10 wakiki