migration failure (page_metadatas, undefined method status for Page)
Reported by l3x | November 25th, 2008 @ 12:52 PM
Starting with the 11-13-2008 database and attempting to run migraions with today's code, we get the following errors...
foo:ansuz-11-25-2008 lex$ rake db:migrate --trace (in
/Users/lex/Sites/ansuz-11-25-2008) Invoke db:migrate
(first_time) Invoke environment (first_time)
Execute environment Execute db:migrate ==
20081114021853 CreatePageMetadatas: migrating
============================== -- create_table(:page_metadatas)
rake aborted! Mysql::Error: Table 'page_metadatas' already exists:
CREATE TABLE page_metadatas (id int(11)
DEFAULT NULL auto_increment PRIMARY KEY, page_id
int(11) DEFAULT NULL NULL, title varchar(255) DEFAULT
NULL NULL, subject varchar(255) DEFAULT NULL NULL,
description text DEFAULT NULL NULL,
publisher varchar(255) DEFAULT NULL NULL,
rights varchar(255) DEFAULT NULL NULL,
created_at datetime DEFAULT NULL NULL,
updated_at datetime DEFAULT NULL NULL) ENGINE=InnoDB
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:147:in
log'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:299:inexecute'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:108:in
create_table'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:434:increate_table'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:330:in
send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:330:inmethod_missing'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:310:in
say_with_time'
/opt/local/lib/ruby/1.8/benchmark.rb:293:inmeasure'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:310:in
say_with_time'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:326:inmethod_missing'
./db/migrate//20081114021853_create_page_metadatas.rb:3:in
up_without_benchmarks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:insend'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:in
migrate'
/opt/local/lib/ruby/1.8/benchmark.rb:293:inmeasure'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:in
migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:430:inmigrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:420:in
each'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:420:inmigrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:357:in
up'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:340:inmigrate'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:99
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
call'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:inexecute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:inexecute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in
invoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:insynchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
invoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:ininvoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in
invoke_task'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:intop_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
each'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:intop_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:intop_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in
run'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in
run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/opt/local/bin/rake:19:inload' /opt/local/bin/rake:19
foo:ansuz-11-25-2008 lex$ rake db:migrate VERSION=0 (in
/Users/lex/Sites/ansuz-11-25-2008) == 20081109194519
AddSiteTitleToSiteSettings: reverting ======================= --
remove_column(:site_settings, :site_title) -> 0.0717s ==
20081109194519 AddSiteTitleToSiteSettings: reverted (0.0719s)
==============
== 20080914031652 AddActsAsTaggableTables: reverting ========================== -- drop_table(:tags) -> 0.0045s -- drop_table(:taggings) -> 0.0017s == 20080914031652 AddActsAsTaggableTables: reverted (0.0066s) =================
== 20080913132029 CreateSiteSettings: reverting =============================== -- drop_table(:site_settings) -> 0.0013s == 20080913132029 CreateSiteSettings: reverted (0.0014s) ======================
== 20080908012455 AddAdminBitToUsers: reverting =============================== -- remove_column(:users, :admin) -> 0.0095s == 20080908012455 AddAdminBitToUsers: reverted (0.0097s) ======================
== 20080907570000 CreateSavageTables: reverting =============================== -- remove_column(:users, :posts_count) -> 0.0107s -- remove_column(:users, :last_seen_at) -> 0.0065s -- drop_table(:topics) -> 0.0015s -- drop_table(:posts) -> 0.0011s -- drop_table(:monitorships) -> 0.0015s -- drop_table(:moderatorships) -> 0.0011s -- drop_table(:forums) -> 0.0013s == 20080907570000 CreateSavageTables: reverted (0.0336s) ======================
== 20080907232248 AddVersionToContentSections: reverting ====================== -- remove_column(:content_sections, :version) -> 0.0049s -- drop_table(:content_section_versions) -> 0.0014s == 20080907232248 AddVersionToContentSections: reverted (0.0066s) =============
== 20080831171235 AddPhotoAlbumsAndPhotoAlbumPhotos: reverting ================ -- drop_table(:photo_album_photos) -> 0.0011s -- drop_table(:photo_albums) -> 0.0010s == 20080831171235 AddPhotoAlbumsAndPhotoAlbumPhotos: reverted (0.0024s) =======
== 20080824204532 AddContentSections: reverting =============================== == 20080824204532 AddContentSections: reverted (0.0000s) ======================
== 20080824195700 CreatePagePlugins: reverting ================================ -- drop_table(:page_plugins) -> 0.0015s == 20080824195700 CreatePagePlugins: reverted (0.0016s) =======================
== 2 CreateUsers: reverting =================================================== -- drop_table("users") -> 0.0011s == 2 CreateUsers: reverted (0.0013s) ==========================================
== 1 CreatePageSchema: reverting ============================================== -- drop_table(:pages) -> 0.0014s == 1 CreatePageSchema: reverted (0.0019s) =====================================
foo:ansuz-11-25-2008 lex$ rake db:migrate (in
/Users/lex/Sites/ansuz-11-25-2008) rake aborted! undefined method
create_index' for
#<ActiveRecord::ConnectionAdapters::MysqlAdapter:0x2516b64>
(See full trace by running task with --trace)
foo:ansuz-11-25-2008 lex$ rake db:migrate --trace (in
/Users/lex/Sites/ansuz-11-25-2008) Invoke db:migrate
(first_time) Invoke environment (first_time)
Execute environment Execute db:migrate == 1
CreatePageSchema: migrating
============================================== --
create_table("pages", {:force=>true}) -> 0.0534s rake
aborted! undefined method status' for #<Page:0x1f7abec>
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:inmethod_missing'
/Users/lex/Sites/ansuz-11-25-2008/vendor/plugins/rails-authorization-plugin/lib/publishare/identity.rb:113:in
method_missing'
/Users/lex/.gem/ruby/1.8/gems/rubyist-aasm-2.0.2/lib/persistence/active_record_persistence.rb:223:insend'
/Users/lex/.gem/ruby/1.8/gems/rubyist-aasm-2.0.2/lib/persistence/active_record_persistence.rb:223:in
aasm_read_state'
/Users/lex/.gem/ruby/1.8/gems/rubyist-aasm-2.0.2/lib/persistence/active_record_persistence.rb:135:inaasm_current_state'
/Users/lex/.gem/ruby/1.8/gems/rubyist-aasm-2.0.2/lib/persistence/active_record_persistence.rb:156:in
aasm_ensure_initial_state'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:insend'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in
evaluate_method'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:incall'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:93:in
run'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:ineach'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:in
send'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:inrun'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in
run_callbacks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:298:incallback'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:264:in
valid?'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:900:insave_without_dirty'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/dirty.rb:75:in
save_without_transactions'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:insave'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:intransaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in
transaction'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:insave'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:118:in
rollback_active_record_state!'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:insave'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:640:in
create'
./db/migrate//001_create_page_schema.rb:23:inup_without_benchmarks'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:in
send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:inmigrate'
/opt/local/lib/ruby/1.8/benchmark.rb:293:in measure'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:264:inmigrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:430:in
migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:420:ineach'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:420:in
migrate'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:357:inup'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb:340:in
migrate'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:99
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:incall'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:ineach'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
execute'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:ininvoke_with_call_chain'
/opt/local/lib/ruby/1.8/monitor.rb:242:in synchronize'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:ininvoke_with_call_chain'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in
invoke'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:ininvoke_task'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:ineach'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
top_level'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:inrun'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:inrun'
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/opt/local/bin/rake:19:in load' /opt/local/bin/rake:19
foo:ansuz-11-25-2008 lex$
Comments and changes to this ticket
-

knewter (at gmail) December 26th, 2008 @ 11:00 AM
- State changed from new to resolved
I've had people build from migrations and not report this, so for now I'm marking it closed. It'll obv. report itself again if it's really still broken. Triage ftw.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Project for ansuz: Open source Rails-based content management that works.