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
thufir@arrakis ~/Desktop/predator-prey $
thufir@arrakis ~/Desktop/predator-prey $ rake db:migrate
(in /home/thufir/Desktop/predator-prey)
thufir@arrakis ~/Desktop/predator-prey $
thufir@arrakis ~/Desktop/predator-prey $ rake db:migrate VERSION=0
(in /home/thufir/Desktop/predator-prey)
== Predators: reverting
– drop_table(:predators)
rake aborted!
SQLite3::SQLException: no such table: predators: DROP TABLE predators
(See full trace by running task with --trace)
thufir@arrakis ~/Desktop/predator-prey $
thanks,
Thufir