Defect #34002

postgres bundle exec rake db:migrate fails

Added by Marco Descher about 1 year ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Database
Target version:-
Resolution:Invalid Affected version:4.1.1

Description

Executing RAILS_ENV=production bundle exec rake db:migrate on a new postgres database (psql (PostgreSQL) 11.7 (Debian 11.7-0+deb10u1) fails with

rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "users" does not exist
LINE 8:                WHERE a.attrelid = '"users"'::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 = '"users"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum
/var/lib/gems/2.5.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `async_exec'
/var/lib/gems/2.5.0/gems/activerecord-5.2.4.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in `block (2 levels) in query'
/var/lib/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/var/lib/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/var/lib/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
...

History

#1 Updated by Marco Descher about 1 year ago

  • Status changed from New to Resolved

This was related to some installed plugins, after removing them setup worked!

#2 Updated by Marius BALTEANU about 1 year ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Marco Descher wrote:

This was related to some installed plugins, after removing them setup worked!

Thanks for your feedback, closing.

#3 Updated by Martin Cizek 7 months ago

FYI: This one was related to #33290 rather than specific plugins. The issue is not present on Redmine 4.2.

Also available in: Atom PDF