فشل 'theme_fields' المفقود وفشل بناء جملة rake db:migrate

مرحباً بالجميع،

أحاول إجراء تثبيت جديد لـ Discourse v2.8.8 على Debian Buster (في Docker). حاليًا، تفشل مهام Sidekiq مع الخطأ التالي المتعلق بـ theme_fields:

2022-09-06 08:25:53.301 AEST [1205] ERROR: relation "theme_fields" does not exist at character 454
2022-09-06 08:25:53.301 AEST [1205] STATEMENT: 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 = '"theme_fields"'::regclass
	   AND a.attnum > 0 AND NOT a.attisdropped
 	 ORDER BY a.attnum

بالبحث في المنتديات، هذا خطأ مشابه للمنشور Restore problem relation theme_fields does not exist؛ والذي للأسف لا يوجد له حل حتى الآن.

بالتحقيق أعمق في هذا الأمر، يبدو أن هذا مرتبط بفشل مهمة db:migrate في حالتي (هذا مجرد تخمين).
تنفيذ RAILS_ENV=test bin/rails db:migrate في الطرفية يعيد خطأ SyntaxError أدناه:

rails aborted!
SyntaxError: /app/lib/tasks/assets.rake:294: syntax error, unexpected '}', expecting `end'
/app/lib/tasks/assets.rake:306: syntax error, unexpected `end', expecting '}'
/app/lib/tasks/assets.rake:418: class definition in method body
  class Sprockets::Manifest
  ^~~~~~~~~~~~~~~~~~~~~~~~
/app/lib/tasks/assets.rake:430: syntax error, unexpected end-of-input, expecting `end'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/usr/local/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `block in load'
/usr/local/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/local/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `load'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/engine.rb:675:in `block in run_tasks_blocks'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/engine.rb:675:in `each'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/engine.rb:675:in `run_tasks_blocks'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/application.rb:528:in `run_tasks_blocks'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/engine.rb:464:in `load_tasks'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `public_send'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/railtie.rb:207:in `method_missing'
/app/Rakefile:9:in `<main>'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/command.rb:50:in `invoke'
/usr/local/bundle/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/commands.rb:18:in `<main>'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:105:in `register'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/usr/local/bundle/ruby/2.7.0/gems/bootsnap-1.9.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
bin/rails:18:in `<main>'
(See full trace by running task with --trace)

بالنظر إلى الكود lib/tasks/assets.rake (v2.8.8)، يبدو أن جميع end و } موضوعة بشكل صحيح. بصفتي خبيرًا غير روبي، يمكنني تخمين أن إحدى قيم المتغيرات قد تكون سببًا في كسر الإغلاقات.

ما الذي يمكن أن يكون قد حدث بشكل خاطئ؟

مع خالص التقدير،

مرحباً بالجميع!

ما زلت أتساءل عما إذا كان لدى أي شخص أي اقتراحات/أفكار لهذه المشكلة.

شكراً لكم
مع خالص التقدير،