Migrate Problems

Hi folks…,

I'm trying to upgrade from an old typo (4.0.3) to the new 4.1.1

having problems in the db:migrate though.

Specifically:

== CleanupContentsTable: migrating

– remove_index(:contents, :article_id)
– remove_column(:contents, :article_id)
rake aborted!
SQLite3::SQLException: table contents has no column named article_id:
CREATE INDEX “altered_contents_article_id_index” ON contents
(“article_id”)

Obviously I’m using SQLite database.

Any suggestions?

I’ve also tried a new installation, and while the new database setup
seems to work, all the tests fail in this case. Looks to be a problem
with the :memory: database set up, though even if I specify a real
database, one of the functional tests still fails.

  1. Error:
    test_destroy(Admin::BlacklistControllerTest):
    ThreadError: not owner

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/plugins/sitealizer/lib/sitealizer.rb:74:in
`unlock’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/plugins/sitealizer/lib/sitealizer.rb:50:in
`join’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/plugins/sitealizer/lib/sitealizer.rb:50:in
`use_sitealizer’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:456:in
`send’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:456:in
`call’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:435:in
`call’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
`call_filter’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in
`call_filter’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:449:in
`call’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
`call_filter’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:619:in
`perform_action_without_benchmark’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
`perform_action_without_rescue’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/rescue.rb:83:in
`perform_action’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:430:in
`send’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:430:in
`process_without_filters’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:624:in
`process_without_session_management_support’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in
`process_without_test’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/test_process.rb:15:in
`process’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/test_process.rb:382:in
`process’

/var/www/www.carscadden.org/htdocs/typo/config/…/vendor/rails/actionpack/lib/action_controller/test_process.rb:353:in
get' ./test/functional/admin/blacklist_controller_test.rb:53:intest_destroy’
./test/functional/admin/…/…/test_helper.rb:21:in __send__' ./test/functional/admin/../../test_helper.rb:21:inrun’

Can someone help?
James C.

Quoting James C. [email protected], who spaketh thusly:

– remove_column(:contents, :article_id)
rake aborted!
SQLite3::SQLException: table contents has no column named article_id:
CREATE INDEX “altered_contents_article_id_index” ON contents
(“article_id”)

Obviously I’m using SQLite database.

That error is because SQLite is trying to create an index for a column
that doesn’t exist in your database.

My experience with SQLite in the past was similar, and when I switched
to a different database (didn’t matter what) everything worked again.
Experimentation taught me that SQLite doesn’t like SQL statements that
alter tables or columns - or at least doesn’t like them as much as
other DBMS.

– Mitch

On 8/20/07, Mitch P. [email protected] wrote:

============================================
that doesn’t exist in your database.

My experience with SQLite in the past was similar, and when I switched
to a different database (didn’t matter what) everything worked again.
Experimentation taught me that SQLite doesn’t like SQL statements that
alter tables or columns - or at least doesn’t like them as much as
other DBMS.

If it’s this bug. I Think that a bug report and Patch totest the Type
Database it’s good.