Is discourse-plugin-linkedin-auth now incompatible with Discourse v2.7.0.beta7 and below?

AI-generated summary

The Discourse Plugin Linkedin Auth is incompatible with Discourse versions below 2.7.0.beta8 due to an ActiveRecord migration issue. The migration 20211203171247_migrate_linkedin_user_info.rb, introduced in December 2021, is causing an error when trying to rebuild on older Discourse versions. This is because the migration uses ActiveRecord 6.1, which is not compatible with the older versions of Discourse that use ActiveRecord 6.0.3.5. As a result, the plugin must be disabled on older Discourse versions until an upgrade to 2.7.0 or later is performed.

Discourse uses ActiveRecord 6.1.3.1 starting from version 2.7.0.beta8, and before that, it used ActiveRecord 6.0.3.5. Which is all good, except that a migration was added to Discourse Plugin Linkedin Auth (20211203171247_migrate_linkedin_user_info.rb), presumably on 2021-12-03, that causes this error when trying to rebuild:

Caused by:
ArgumentError: Unknown migration version "6.1"; expected one of "4.2", "5.0", "5.1", "5.2", "6.0"
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration/compatibility.rb:11:in `find'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:544:in `[]'
/var/www/discourse/plugins/discourse-plugin-linkedin-auth/db/migrate/20211203171247_migrate_linkedin_user_info.rb:3:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1010:in `load_migration'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1006:in `migration'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1002:in `disable_ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1368:in `use_transaction?'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1360:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1280:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1229:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1229:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1061:in `up'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/migration.rb:1036:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.5/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/var/www/discourse/lib/tasks/db.rake:215:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

There’s no branch that I can find on the plugin either to pull an older version when installing my plugin, so I have to disable the plugin on my older Discourse version.

(Note, we do intend on upgrading to 2.7.0; we just wanted to build a clone of the existing (old) Discourse we have, but can’t because the plugin migration is failing)

Thanks.