Project

General

Profile

Actions

Bug #28608

closed

db:migrate on fresh db fails

Added by Ohad Levy about 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

when trying out a new fresh db using latest develop I'm getting the following trace:

home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `exec': PG::UndefinedTable: ERROR:  relation "lookup_keys" does not exist
LINE 8:                WHERE a.attrelid = '"lookup_keys"'::regclass
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
                     c.collname, col_description(a.attrelid, a.attnum) AS comment
                FROM pg_attribute a
                LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
                LEFT JOIN pg_type t ON a.atttypid = t.oid
                LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
               WHERE a.attrelid = '"lookup_keys"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
 (ActiveRecord::StatementInvalid)
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `block (2 levels) in query'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:62:in `block in query'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `synchronize'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:61:in `query'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:749:in `column_definitions'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:113:in `columns'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/schema_cache.rb:69:in `columns'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/schema_cache.rb:75:in `columns_hash'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/model_schema.rb:466:in `load_schema!'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/attributes.rb:234:in `load_schema!'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/attribute_decorators.rb:51:in `load_schema!'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/model_schema.rb:459:in `block in load_schema'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/model_schema.rb:456:in `synchronize'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/model_schema.rb:456:in `load_schema'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/model_schema.rb:336:in `columns_hash'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/inheritance.rb:78:in `descends_from_active_record?'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/inheritance.rb:84:in `finder_needs_type_condition?'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/core.rb:286:in `relation'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/scoping/named.rb:50:in `default_scoped'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/scoping/named.rb:36:in `all'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activerecord-5.2.1/lib/active_record/querying.rb:5:in `any?'
    from /home/ohad/git/foreman/config/initializers/deprecations.rb:59:in `block (2 levels) in <main>'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/application/finisher.rb:75:in `block in <module:Finisher>'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `each'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `call'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
    from /home/ohad/git/foreman/config/environment.rb:5:in `<main>'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application.rb:106:in `preload'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run'
    from /home/ohad/.rvm/gems/ruby-2.7.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
    from /home/ohad/.rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'

removing the deperication method at config/initializers/deprecations.rb workaround the issue.


Related issues 1 (0 open1 closed)

Related to Foreman - Refactor #28278: Remove smart variablesResolvedActions
Actions #1

Updated by Ohad Levy about 4 years ago

Actions #2

Updated by Tomer Brisker almost 4 years ago

  • Status changed from New to Resolved

Can't reproduce, and the deprecation has been removed by now. Closing.

Actions

Also available in: Atom PDF