Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/backup/database.rb')
-rw-r--r--lib/backup/database.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/backup/database.rb b/lib/backup/database.rb
index a4ac404d245..de26dbab038 100644
--- a/lib/backup/database.rb
+++ b/lib/backup/database.rb
@@ -90,7 +90,26 @@ module Backup
report_success(success)
raise Backup::Error, 'Restore failed' unless success
- errors
+ if errors.present?
+ warning = <<~MSG
+ There were errors in restoring the schema. This may cause
+ issues if this results in missing indexes, constraints, or
+ columns. Please record the errors above and contact GitLab
+ Support if you have questions:
+ https://about.gitlab.com/support/
+ MSG
+
+ warn warning.color(:red)
+ Gitlab::TaskHelpers.ask_to_continue
+ end
+ end
+
+ def enabled
+ true
+ end
+
+ def human_name
+ _('database')
end
protected