Skip to content

Commit

Permalink
set "mysql" as an enabled database (#1925)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
browner12 authored Jan 19, 2024
1 parent 1c91f9e commit bc80360
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bc80360

Please sign in to comment.