Error upgrading to 2.6.0.beta4

/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.1.0/lib/patches/db/pg.rb:110:in exec' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.1.0/lib/patches/db/pg.rb:110:in async_exec’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:65:in block (2 levels) in query' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies/interlock.rb:48:in block in permit_concurrent_loads’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/dependencies/interlock.rb:47:in permit_concurrent_loads’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:64:in block in query' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract_adapter.rb:722:in block (2 levels) in log’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract_adapter.rb:721:in block in log’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/notifications/instrumenter.rb:24:in instrument' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract_adapter.rb:712:in log’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:63:in query' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/postgresql_adapter.rb:820:in column_definitions’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:114:in columns' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/schema_cache.rb:76:in columns’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/schema_cache.rb:82:in columns_hash' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:488:in load_schema!’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/attributes.rb:247:in load_schema!' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/attribute_decorators.rb:50:in load_schema!’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:478:in block in load_schema' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:475:in load_schema’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:362:in attribute_types' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/model_schema.rb:386:in type_for_attribute’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/table_metadata.rb:33:in type' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:51:in build’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:109:in block in expand_from_hash' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in each’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in flat_map' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:68:in expand_from_hash’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/predicate_builder.rb:21:in build_from_hash' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/where_clause_factory.rb:19:in build’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/query_methods.rb:656:in where!' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association_scope.rb:154:in apply_scope’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association_scope.rb:65:in last_chain_scope' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association_scope.rb:122:in add_constraints’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association_scope.rb:29:in scope' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association_scope.rb:7:in scope’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association.rb:225:in association_scope' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association.rb:101:in scope’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:289:in scope' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association.rb:204:in find_target’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:274:in load_target' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_proxy.rb:43:in load_target’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_proxy.rb:1001:in records' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/relation/delegation.rb:87:in each’
/opt/bitnami/apps/discourse/htdocs/app/models/group_user.rb:128:in each_with_object' /opt/bitnami/apps/discourse/htdocs/app/models/group_user.rb:128:in set_category_notifications’
/opt/bitnami/apps/discourse/htdocs/app/models/group_user.rb:124:in set_category_notifications' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:428:in block in make_lambda’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:238:in block in halting_and_conditional' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in block in invoke_after’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in each' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:517:in invoke_after’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:136:in run_callbacks' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/callbacks.rb:825:in _run_save_callbacks’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/callbacks.rb:327:in create_or_update' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/timestamp.rb:128:in create_or_update’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/persistence.rb:503:in save!' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/validations.rb:53:in save!’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:318:in block in save!' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:375:in block in with_transaction_returning_status’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:212:in transaction’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:366:in with_transaction_returning_status' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:318:in save!’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/suppressor.rb:48:in save!' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:360:in insert_record’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/has_many_association.rb:36:in insert_record' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:347:in block (2 levels) in _create_record’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:447:in replace_on_target' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:285:in add_to_target’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:346:in block in _create_record' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:135:in block in transaction’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:212:in transaction’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:134:in transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_association.rb:344:in _create_record’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/has_many_association.rb:115:in _create_record' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/association.rb:199:in create!’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/associations/collection_proxy.rb:363:in create!' /opt/bitnami/apps/discourse/htdocs/app/models/group.rb:566:in block in user_trust_level_change!’
/opt/bitnami/apps/discourse/htdocs/app/models/group.rb:563:in each' /opt/bitnami/apps/discourse/htdocs/app/models/group.rb:563:in user_trust_level_change!’
(eval):36:in block (2 levels) in run_file' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:46:in eval’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:46:in block (2 levels) in run_file' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:58:in block in open’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:57:in open' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:57:in open’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:36:in block in run_file' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in block in transaction’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:280:in block in within_new_transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in block (2 levels) in synchronize’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in handle_interrupt' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in handle_interrupt' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/transaction.rb:278:in within_new_transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in transaction’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.3/lib/active_record/transactions.rb:212:in transaction' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:35:in run_file’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:26:in block in run' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in each’
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu/runner.rb:25:in run' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/seed-fu-2.3.9/lib/seed-fu.rb:29:in seed’
/opt/bitnami/apps/discourse/htdocs/lib/tasks/db.rake:222:in block in <main>' /opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in <top (required)>’
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

I don’t have a backup of the previous version, so I need to fix this one. What is the error about? How can I fix it?

Thanks

Any ideas how to fix this error in the DB migration, @jota?

Thanks.

@jota, I following every step of the DB migration, and it fails. Could you please explain me what the issue is about and how it can be fixed?

Thanks.

Hi @jota, could you please tell me how I can fix this error? I followed the instructions in your documentation and that was the result.

@jota, the instructions don’t work because I am getting an error with the data model.

Please advise ASAP please.

Hi @migsy,

We are working on upgrading a Discourse deployment from 2.5.0 to that beta version to confirm that the documentation is correct. I’ll update this thread as soon as we have more information.

Thanks for your answer @jota.

Regardless of updating the documentation, what can I do to fix this issue? Because my site has been down for 8 days now.

Hi @migsy,

I obtained an error when upgrading the application to that beta version.

bitnami@ip-172-31-2-51:/opt/bitnami/apps/discourse/htdocs$ sudo /opt/bitnami/ruby/bin/ruby bin/rake db:migrate RAILS_ENV=production
== 20200804144550 AddTitleToPolls: migrating ==================================
-- add_column(:polls, :title, :string)
   -> 0.0062s
== 20200804144550 AddTitleToPolls: migrated (0.0134s) =========================

rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "group_category_notification_defaults" does not exist
LINE 8:  WHERE a.attrelid = '"group_category_notification_defaults"'...

As it’s a beta release, I understand the code can contain errors so I suggest you contact them to know if the upgrade process is already supported.

Regarding about what to do now, I suggest you these paths:

  • If you created a backup of the instance previously, use it to recover it.
  • If you didn’t, move back to the previous version you had and install the gems again
git checkout Gemfile*
git checkout bin
git stash
git fetch
git checkout tags/vYOUR_PREVIOUS_VERSION
git stash apply
gem install bundler -v BUNDLER-VERSION
bundle config default BUNDLER-VERSION
sudo bundle install --without development test sqlite --binstubs --deployment
sudo /opt/bitnami/ctlscript.sh start

The application should work now. I did that after getting the db:migrate error and everything is working as expected

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.