diff --git a/ghost/admin/app/controllers/whatsnew.js b/ghost/admin/app/controllers/whatsnew.js index 11c94a1576..9f1fb4d5b5 100644 --- a/ghost/admin/app/controllers/whatsnew.js +++ b/ghost/admin/app/controllers/whatsnew.js @@ -13,12 +13,19 @@ export default class WhatsNewController extends Controller { return date.getFullYear(); } - get showDatabaseWarning() { + get databaseWarning() { const isProduction = !!this.config.get('environment').match?.(/production/i); const isPro = !!this.config.get('hostSettings')?.siteId; + const database = this.config.get('database'); - if (isProduction && !isPro) { - return true; + // Show a warning if we're in production and not using MySQL 8 + if (isProduction && !isPro && database !== 'mysql8') { + return 'MySQL 8 will be the required database in the next major release of Ghost.'; + } + + // Show a warning if we're in development and using MySQL 5 + if (!isProduction && !isPro && database === 'mysql5') { + return 'MySQL 5 will no longer be supported in the next major release of Ghost.'; } return false; diff --git a/ghost/admin/app/templates/whatsnew.hbs b/ghost/admin/app/templates/whatsnew.hbs index 7494d38b3f..b2897b5a71 100644 --- a/ghost/admin/app/templates/whatsnew.hbs +++ b/ghost/admin/app/templates/whatsnew.hbs @@ -59,10 +59,10 @@ {{/if}} - {{#if this.showDatabaseWarning}} + {{#if this.databaseWarning}}

- Warning: MySQL 8 will be the required database in the next major release of Ghost. Make sure your database is up to date to ensure forwards compatibility. + Warning: {{this.databaseWarning}} Make sure your database is up to date to ensure forwards compatibility.

{{/if}}