Bryan Crossland wrote in post #988721:

> Your migration failed and you have a partially migrated database in
> SQLite.
> I would suggest dropping and recreating your test database by hand and
> then running your tests again.

Unfortunately, that did not help. I deleted the database and recreated 
it (BTW, this is a really simple test project with just one relation), 
but I still get the same error. I still cannot do rake db:rollback in 
the development environment. This is the output with --trace:

** Invoke db:rollback (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:rollback
==  CreateProducts: reverting 
=================================================
-- drop_table(:products)
rake aborted!
An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE 
"products" CASCADE
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:207:in
 
`rescue in log'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract_adapter.rb:199:in
 
`log'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/connection_adapters/sqlite_adapter.rb:135:in
 
`execute'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rails_sql_views-0.8.0/lib/rails_sql_views/connection_adapters/abstract/schema_statements.rb:62:in
 
`drop_table_with_cascade'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:383:in
 
`block in method_missing'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:359:in
 
`block in say_with_time'
/home/vlad/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/benchmark.rb:294:in 
`measure'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:359:in
 
`say_with_time'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:379:in
 
`method_missing'
/home/vlad/workspace/depot/db/migrate/20110315224838_create_products.rb:14:in 
`down'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:312:in
 
`block in migrate'
/home/vlad/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/benchmark.rb:294:in 
`measure'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:312:in
 
`migrate'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:395:in
 
`migrate'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:537:in
 
`block (2 levels) in migrate'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:611:in
 
`call'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:611:in
 
`block in ddl_transaction'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in
 
`transaction'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/transactions.rb:207:in
 
`transaction'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:611:in
 
`ddl_transaction'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:536:in
 
`block in migrate'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:523:in
 
`each'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:523:in
 
`migrate'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:437:in
 
`down'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:480:in
 
`move'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/migration.rb:425:in
 
`rollback'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.0.5/lib/active_record/railties/databases.rake:211:in
 
`block (2 levels) in <top (required)>'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:636:in 
`call'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:636:in 
`block in execute'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:631:in 
`each'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:631:in 
`execute'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:597:in 
`block in invoke_with_call_chain'
/home/vlad/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in 
`mon_synchronize'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:590:in 
`invoke_with_call_chain'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:583:in 
`invoke'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2051:in 
`invoke_task'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2029:in 
`block (2 levels) in top_level'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2029:in 
`each'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2029:in 
`block in top_level'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2068:in 
`standard_exception_handling'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2023:in 
`top_level'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2001:in 
`block in run'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:2068:in 
`standard_exception_handling'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake.rb:1998:in 
`run'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/bin/rake:31:in 
`<top (required)>'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `load'
/home/vlad/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `<main>'

rake db:migrate run without any errors.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to