Commit 30eee67726b8cbf261f271a5a272e3c2f1d8b0f2
Exists in
master
and in
4 other branches
Merge pull request #1106 from mrichardson-shelter/backup-create-fix-mysql-syntax-error
Fixing MySQL syntax error
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/tasks/gitlab/backup.rake
... | ... | @@ -159,7 +159,7 @@ namespace :gitlab do |
159 | 159 | print "- Dumping table #{tbl}... " |
160 | 160 | count = 1 |
161 | 161 | File.open(File.join(backup_path_db, tbl + ".yml"), "w+") do |file| |
162 | - ActiveRecord::Base.connection.select_all("SELECT * FROM #{tbl}").each do |line| | |
162 | + ActiveRecord::Base.connection.select_all("SELECT * FROM `#{tbl}`").each do |line| | |
163 | 163 | line.delete_if{|k,v| v.blank?} |
164 | 164 | output = {tbl + '_' + count.to_s => line} |
165 | 165 | file << output.to_yaml.gsub(/^---\n/,'') + "\n" | ... | ... |