SMF2 to Discourse Migration Issue

OK. So for those of you that come across this I had to do a fair bit to massage this import script into working.

The MySQL docker container is version 8.

This means for some reason the mariadb library that the MySQL template draws in doesn’t work.

What I did differently than https://meta.discourse.org/t/smf2-to-discourse-the-ultimate-guide/90314:

I did not include the MySQL template file in the import docker container config file.

I built the import container, entered into it with ./launcher enter import

Then:

echo "gem 'mysql2'" >> Gemfile
wget https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb
dpkg -i mysql-apt-config_0.8.17-1_all.deb

This has an interactive prompt and you can select the defaults (MySQL 8 with tools)

Then I installed the normal MySQL 8 library and continued the build:

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmysqlclient-dev
su discourse -c 'bundle config unset deployment'
su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without test development'

Once this was all done the rest was the same, the import is now running.

The Discourse devs may want to adjust the import scripts to account for this, at least it’s now on the forums for others to see if they get stuck like I did.