Drop mysql2 support, settle on postgresql

It's enough work to support one database, let's settle on
the defacto Rails default.
This commit is contained in:
Henne Vogelsang 2024-06-06 17:16:02 +02:00
parent f51db484ab
commit b2f0796799
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
11 changed files with 38 additions and 40 deletions

View file

@ -1,13 +0,0 @@
# frozen_string_literal: true
require 'yaml'
task :dump_db do
yaml = YAML.load_file("config/database.yml")
conf = yaml["production"]
filename = "#{conf["database"]}-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S:%L")}.sql"
if conf["adapter"] == 'mysql2'
system "mysqldump -u #{conf["username"]} --password=#{conf["password"]} -h #{conf["host"]} #{conf["database"]} > ~/#{filename}"
else
puts "Error: This rake task only works for MYSQL"
end
end