diff options
| author | Michael Kozono <mkozono@gmail.com> | 2017-11-15 02:36:25 -0800 |
|---|---|---|
| committer | Michael Kozono <mkozono@gmail.com> | 2017-12-01 15:26:41 -0800 |
| commit | dd8680a7ae4be279ae1d90f0889317a1e6ee0d95 (patch) | |
| tree | a97ee3dbfe656c3799cfe295e3f585b45d182a72 /lib | |
| parent | d530085685105e2d7cd6d87ba866756683f0488d (diff) | |
| download | gitlab-ce-dd8680a7ae4be279ae1d90f0889317a1e6ee0d95.tar.gz | |
Drop temporary tracking table when finished
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/background_migration/populate_untracked_uploads.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/background_migration/populate_untracked_uploads.rb b/lib/gitlab/background_migration/populate_untracked_uploads.rb index 8529e8d1d0b..f28892174bb 100644 --- a/lib/gitlab/background_migration/populate_untracked_uploads.rb +++ b/lib/gitlab/background_migration/populate_untracked_uploads.rb @@ -208,6 +208,8 @@ module Gitlab # to do. end end + + drop_temp_table_if_finished end private @@ -215,6 +217,10 @@ module Gitlab def migrate? UntrackedFile.table_exists? && Upload.table_exists? end + + def drop_temp_table_if_finished + UntrackedFile.connection.drop_table(:untracked_files_for_uploads) if UntrackedFile.untracked.empty? + end end end end |
