Project

General

Profile

Actions

Bug #15040

closed

Could not find table 'users' during db:migrate

Added by Dominic Cleal over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

db:migrate on a clean setup is failing on develop since #12225:

rake db:migrate
The Apipie cache is turned off. Enable it and run apipie:cache rake task to speed up API calls.
rake aborted!
ActiveRecord::StatementInvalid: Could not find table 'users'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:513:in `table_structure'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/sqlite3_adapter.rb:387:in `columns'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/attributes.rb:93:in `columns'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/attributes.rb:98:in `columns_hash'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:48:in `columns_hash'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/relation/calculations.rb:178:in `block in pluck'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/relation/calculations.rb:177:in `map'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activerecord-4.2.6/lib/active_record/relation/calculations.rb:177:in `pluck'
/home/dcleal/code/foreman/foreman/config/initializers/foreman.rb:38:in `<top (required)>'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/engine.rb:652:in `block in load_config_initializer'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/engine.rb:651:in `load_config_initializer'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/engine.rb:615:in `each'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/engine.rb:615:in `block in <class:Engine>'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `each'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `public_send'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `method_missing'
/home/dcleal/code/foreman/foreman/config/environment.rb:5:in `<top (required)>'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/bin/ruby_executable_hooks:15:in `eval'
/home/dcleal/.rvm/gems/ruby-2.3.0@foreman/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

(also http://ci.theforeman.org/job/test_develop/2092/)


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #12225: TopbarSweeper should invalidate on plugin installation/removalClosedLukas Zapletal10/20/2015Actions
Related to Foreman - Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purposeNew07/27/2016Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #12225: TopbarSweeper should invalidate on plugin installation/removal added
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #3

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3524 added
Actions #4

Updated by Dominic Cleal over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #5

Updated by Ivan Necas over 8 years ago

  • Related to Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purpose added
Actions

Also available in: Atom PDF