I’m working on migrating a site that was on a very old (2.5.0) decidedly non-standard install (I think it is k8s?) so that it can be moved to CDCK hosting.
They dumped the database by hand and I renamed it to make the restore process restore it, then did a bunch of remap commands to get hostname stuff straightened out. It seemed like it was all set, but when I rebaked the posts, I get a bunch of them that are failing like this:
Jobs::HandledExceptionWrapper: Wrapped RuntimeError: Undeclared attribute type for enum 'status'. Enums must be backed by a database column or declared with an explicit type via `attribute`.
The error seems to come from here:
/var/www/discourse/app/jobs/regular/pull_hotlinked_images.rb:17:in `execute'
I suppose it could be that I renamed the file wrong and it missed a migration?
v20200618175923 seems to be what I expected for their commit 6a42acbfb72d4ea7dc501ff2240abc8e89f650c6
Here’s the full backtrace.
activerecord-7.1.4/lib/active_record/enum.rb:250:in `block in _enum'
activerecord-7.1.4/lib/active_record/attributes.rb:225:in `block in attribute'
activerecord-7.1.4/lib/active_record/attributes.rb:266:in `block in load_schema!'
activerecord-7.1.4/lib/active_record/attributes.rb:265:in `each'
activerecord-7.1.4/lib/active_record/attributes.rb:265:in `load_schema!'
activerecord-7.1.4/lib/active_record/encryption/encryptable_record.rb:127:in `load_schema!'
activerecord-7.1.4/lib/active_record/model_schema.rb:567:in `block in load_schema'
activerecord-7.1.4/lib/active_record/model_schema.rb:564:in `synchronize'
activerecord-7.1.4/lib/active_record/model_schema.rb:564:in `load_schema'
activerecord-7.1.4/lib/active_record/model_schema.rb:445:in `attribute_types'
activerecord-7.1.4/lib/active_record/model_schema.rb:471:in `type_for_attribute'
activerecord-7.1.4/lib/active_record/type_caster/map.rb:16:in `type_for_attribute'
activerecord-7.1.4/lib/arel/table.rb:111:in `type_for_attribute'
activerecord-7.1.4/lib/active_record/table_metadata.rb:18:in `type'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:59:in `build'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:54:in `[]'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:132:in `block in expand_from_hash'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:79:in `each'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:79:in `flat_map'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:79:in `expand_from_hash'
activerecord-7.1.4/lib/active_record/relation/predicate_builder.rb:25:in `build_from_hash'
activerecord-7.1.4/lib/active_record/relation/query_methods.rb:1526:in `build_where_clause'
activerecord-7.1.4/lib/active_record/relation/query_methods.rb:943:in `where!'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:163:in `apply_scope'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:66:in `block in last_chain_scope'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:64:in `each'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:64:in `last_chain_scope'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:125:in `add_constraints'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:29:in `scope'
activerecord-7.1.4/lib/active_record/associations/association_scope.rb:7:in `scope'
activerecord-7.1.4/lib/active_record/associations/association.rb:274:in `association_scope'
activerecord-7.1.4/lib/active_record/associations/association.rb:109:in `scope'
activerecord-7.1.4/lib/active_record/associations/collection_association.rb:295:in `scope'
activerecord-7.1.4/lib/active_record/associations/association.rb:226:in `find_target'
activerecord-7.1.4/lib/active_record/associations/collection_association.rb:270:in `load_target'
activerecord-7.1.4/lib/active_record/associations/collection_proxy.rb:45:in `load_target'
activerecord-7.1.4/lib/active_record/associations/collection_proxy.rb:1012:in `records'
activerecord-7.1.4/lib/active_record/relation/delegation.rb:100:in `each'
/var/www/discourse/app/jobs/regular/pull_hotlinked_images.rb:27:in `map'
/var/www/discourse/app/jobs/regular/pull_hotlinked_images.rb:27:in `pull_hotlinked_images'
/var/www/discourse/app/jobs/regular/pull_hotlinked_images.rb:18:in `block in execute'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/app/jobs/regular/pull_hotlinked_images.rb:17:in `execute'
/var/www/discourse/app/jobs/base.rb:322:in `block (2 levels) in perform'
rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
/var/www/discourse/app/jobs/base.rb:309:in `block in perform'
/var/www/discourse/app/jobs/base.rb:305:in `each'
/var/www/discourse/app/jobs/base.rb:305:in `perform'
sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job'
sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process'
sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:177:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:132:in `call'
sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:179:in `block in invoke'
sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:182:in `invoke'
sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process'
sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local'
sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.5.12/lib/sidekiq.rb:44:in `block in <module:Sidekiq>'
sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats'
sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global'
sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare'
sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process'
sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog'
sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread
OTOH, the site seems to be working, so maybe I should just upload it and see what happens when it gets to you guys.