From bc80360a2c87e107ef1d75f26c6a63f44dcd5207 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 19 Jan 2024 13:30:26 -0600 Subject: [PATCH] set "mysql" as an enabled database (#1925) MySQL is kind of a weird case, because it's our default database, and it cannot (shouldn't?) run side by side with MariaDB. We kind of cheated this previously by having "mysql" as a key in the "features" configuration, but it's technically not a "feature" as it doesn't have a file in `/scripts/features/`. this resulted in an "Invalid feature: mysql" warning in the provision script. This change will allow us to remove `mysql: true` from our docs and example files, while still having MySQL work correctly. --- scripts/homestead.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 54cd50882..372a46d76 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -604,6 +604,11 @@ def self.configure(config, settings) end end + # Enable MySQL if MariaDB is not enabled + if (!enabled_databases.include? 'mysql') && (!enabled_databases.include? 'mariadb') + enabled_databases.push 'mysql' + end + settings['databases'].each do |db| if (enabled_databases.include? 'mysql') || (enabled_databases.include? 'mysql8') || (enabled_databases.include? 'mariadb') config.vm.provision 'shell' do |s| @@ -698,6 +703,11 @@ def self.configure(config, settings) end end + # Enable MySQL if MariaDB is not enabled + if (!enabled_databases.include? 'mysql') && (!enabled_databases.include? 'mariadb') + enabled_databases.push 'mysql' + end + # Loop over each DB settings['databases'].each do |database| # Backup MySQL/MariaDB