From ae3fd88cf94470e9233ddfee0d6c276556873e21 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sat, 29 Dec 2012 17:01:41 -0600 Subject: [PATCH] remove backticks that break Postgres for raw sql in backup create task --- lib/tasks/gitlab/backup.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake index 3595ba222a2..6d2bc3d3dfd 100644 --- a/lib/tasks/gitlab/backup.rake +++ b/lib/tasks/gitlab/backup.rake @@ -165,7 +165,7 @@ namespace :gitlab do print "#{tbl.yellow} ... " count = 1 File.open(File.join(backup_path_db, tbl + ".yml"), "w+") do |file| - ActiveRecord::Base.connection.select_all("SELECT * FROM `#{tbl}`").each do |line| + ActiveRecord::Base.connection.select_all("SELECT * FROM #{tbl}").each do |line| line.delete_if{|k,v| v.blank?} output = {tbl + '_' + count.to_s => line} file << output.to_yaml.gsub(/^---\n/,'') + "\n" -- GitLab