mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
f51db484ab
commit
b2f0796799
11 changed files with 38 additions and 40 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue