I'm having a very odd problem with db:migrate. I'm using Rails 1.2.5
on Windows XP SP2 and Ruby 1.8.6
I have seven migrations. If I run them with an empty database, it
runs the first three, then halts. When I look in schema_info, the
version is 3.
If I run db:migrate VERSION=7, then it runs through the remaining 4
migrations, and the version is 7 in the DB. Committed and everything.
If I then run db:migrate on its own, then Rails will REVERT BACK those
4 migrations and set the version to 3 again.
I don't understand this behaviour. I've tried --trace and --verbose
and neither explains why it is that Rails wants to roll back when the
version is 7.
I've only just recently arrived to Rails and Rake, so I'm not familiar
with the internal structure, but I don't see this behaviour mentioned
in any of the documentation. Can anyone help?
It would be beneficial if you can send us the output that is presented
to you while you do the db:migrate.
Specially from migrating your db schema to an empty database.
Mr. Biedenharn,
I am very grateful to observe your answer here and find the
implications of viewing ones' SET variables as instrumental to running
on a Windows XP machine. Would you by chance know how to change these
at the DOS command line?
Thank you,
Kathleen
It's been a while since I've had a Windows system around, but I
believe either:
unset VERSION
or possibly:
set VERSION=
might work.
If you're actually in Windows, not DOS, you can go to ControlPanel-
>System->Environment and remove the setting of the VERSION variable.
(The details of getting to that window are only approximate!)