# ! BREAKING CHANGE ! Attention! There are two things you need to change manually: 1. insert secrets for mysql database and smtp 2. migrate your MySQL database from 5.7 to 8.0 ## 1. insert secret The recipe now includes two secrets: `db_password` and `smtp_password` make sure you change them. To not break somthing, just insert `ghost` as `db_password` because this was the hard coded password before. If desired to change the db-password, I recommend to do try it after migrating as I run in some difficult to debug problems doing this. abra app secret insert $APP db_password v1 ghost abra app secret insert $APP smtp_password v1 your_smtp_password and adapt your env: add SECRET_DB_PASSWORD_VERSION=v1 SECRET_SMTP_PASSWORD_VERSION=v1 delete mysql and smtp-password env. ## 2. migrate your MySQL database from 5.7 to 8.0 Recipe updates MySQL version from 5.7 to 8.0 as it is the only supported version of ghost: https://ghost.org/docs/faq/supported-databases/ This makes a manual migration necessary. This one worked for me. Although you create a database-backup. Better to make sure you have a full backup before. ## Follow these steps: # set your env-var to APP_URL to not have to repeat yourself APP_URL=queerit.org # First make a full backup of database abra app run "$APP_URL" db -t -- mysqldump -u root -pghost ghost > ~/.abra/backups/"$APP_URL"_pre_upgrade_to_mysql_8.sql 2>/dev/null # undeploy abra app undeploy "$APP_URL" # delete database volume abra app volume rm "$APP_URL" # -> press "left" to deselect all, then "up"/"down" to find the volume, "space" to select "foo_bar_com_mysql, "enter" to confirm # redeploy (with the current recipe, db version 8.0 - will recreate database volume # attention: because the app service is restarted as well, it will reinitialize soon the database # this can lead to errors when restoring the database. I ran into: ERROR 1050 (42S01) at line 1147: Table 'members_stripe_customers_subscriptions' already exists # solved it be deleting the volume again and restoring the databse as soon as possible after redeploying abra app deploy "$APP_URL" # restore database abra app run "$APP_URL" db -t -- mysql -u root -pghost ghost < ~/.abra/backups/"$APP_URL"_pre_upgrade_to_mysql_8.sql # correct db by creating ALTER TABLE commands like its described here: https://ghost.org/docs/faq/supported-databases/ echo "SET foreign_key_checks=0;" > ~/.abra/backups/"$APP_URL"_alter_table.sql abra app run ghost.dev.local-it.cloud db -t -- mysql -u root -pghost ghost -B --disable-column-names -e 'SELECT CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; ", "ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;") AS alter_sql FROM information_schema.TABLES WHERE TABLE_SCHEMA = database();' >> ~/.abra/backups/"$APP_URL"_alter_table.sql 2>/dev/null echo "SET foreign_key_checks=1;" >> ~/.abra/backups/"$APP_URL"_alter_table.sql # run these alter_table.sql commands abra app run "$APP_URL" db -t -- mysql -u root -pghost ghost < ~/.abra/backups/"$APP_URL"_alter_table.sql