summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/backup.rake
diff options
context:
space:
mode:
authorMichael Richardson <michael_richardson@shelter.org.uk>2012-07-18 11:59:32 +0100
committerMichael Richardson <michael_richardson@shelter.org.uk>2012-07-18 11:59:32 +0100
commit0456ceddb4d56e2090bfd03cf7e6c0bd7a2d8db9 (patch)
tree266a45ec0a706aaecb0ce4af5a98448cb15f458d /lib/tasks/gitlab/backup.rake
parent88033500232f12234a9546aa9b89111bcdbfecef (diff)
downloadgitlab-ce-0456ceddb4d56e2090bfd03cf7e6c0bd7a2d8db9.tar.gz
Fixing MySQL syntax error
Diffstat (limited to 'lib/tasks/gitlab/backup.rake')
-rw-r--r--lib/tasks/gitlab/backup.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/backup.rake b/lib/tasks/gitlab/backup.rake
index 4fbde37ef3e..014483d4e8c 100644
--- a/lib/tasks/gitlab/backup.rake
+++ b/lib/tasks/gitlab/backup.rake
@@ -159,7 +159,7 @@ namespace :gitlab do
print "- Dumping table #{tbl}... "
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"