Forum: Typo 2.6 to 4.1.1 migration hell

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dc893c4b153a985de7f6b7088d2207c8?d=identicon&s=25 Rodger Donaldson (Guest)
on 2007-05-12 22:51
(Received via mailing list)
So, I'm looking to migrate a typo 2.6 installation to 4.1.1.  Fate is
clearly punishing me for my laziness in not upgrading before.

In order to avoid hosing my production typo install I've taken a copy
(via cp -dpR) of the existing typo install, and done a dump/restore
from the production DB into a test DB.

RAILS_ENV is set to test; running  typo install /home/rodgerd/typo-4.1.1

churns for a while and then:

 Migrating Typo's database to newest release
rake aborted!
Multiple migrations have the version number 1

(See full trace by running task with --trace)
/usr/local/ruby-1.8.6/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:530:in
`migrate': Migration failed (RailsInstaller::InstallFailed)

So, thinks I, I'll whack this with a bigger hammer, knowing full well
it's probably a remarkably bad idea:

rake migrate VERSION=2 --trace

** Execute db:migrate
DEPRECATION WARNING: The inferred foreign_key name will change in Rails
2.0 to use the association name instead of its class name when they
differ.  When using :class_name in belongs_to, use the :foreign_key
option to explicitly set the key name to avoid problems in the
transition.  See http://www.rubyonrails.org/deprecation for details.
(called from ./db/migrate//039_serialize_blog_attributes.rb:4)
rake aborted!
Multiple migrations have the version number 9
/home/rodgerd/typo-4.1.1/config/../vendor/rails/activerecord/lib/active_record/migration.rb:354:in
`assert_unique_migration_version'

So, is this:

1/ A problem between chair and keyboard or
2/ A problem with the migrate scripts?

And is the best solution likely to be:

1/ Wait for a rails guru to fix the migrate scripts,
2/ Spend a few days learning how to fix the migrate scripts, or
3/ Uninstall 4.1.1, install 4.0, migrate 2.6 -> 4.0 and thence to 4.1?

--
Rodger Donaldson    rodgerd@diaspora.gen.nz
"Democracy is the worst form of government.  Except, of course, for all
those other forms of government mankind has tried."
This topic is locked and can not be replied to.