I don't understand why the rake fails. More precisely, the rake
succeeds, but reverting to version 0 fails and I don't see why
thufir@arrakis ~/Desktop/predator-prey $
thufir@arrakis ~/Desktop/predator-prey $
thufir@arrakis ~/Desktop/predator-prey $ cat db/migrate/
001_predators.rb
class Predators < ActiveRecord::Migration
def self.up
create_table :predators do |table|
table.column :predator, :string
end
end
def self.down
drop_table :predators
end
end
Sounds like it already thought you were at schema level 1. Did you
change the migration after having previously run it (without migrating
down to 0 in between)
I guess it could be due to running the "rake db:migrate" prior to
configuring the db/migration/001_ file to add/drop tables?
I'd like to be able to "rake db:migrate VERSION=0"; to do so, merge back
to r2 and configure the db/migration/001_ file *prior* to the initial
"rake db:migrate" command.
Sorta kinda makes sense. I know, kinda silly in a way, but I'd like to
fix it.
Sounds like it already thought you were at schema level 1. Did you
change the migration after having previously run it (without migrating
down to 0 in between)
I guess it could be due to running the "rake db:migrate" prior to
configuring the db/migration/001_ file to add/drop tables?
that would do it. comment out the stuff in the down migration, migrate down, uncomment and migrate back up.