prepare_unhashed_uploads.rb 679 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
module Gitlab
  module BackgroundMigration
    class PrepareUnhashedUploads
      class UnhashedUploadFile < ActiveRecord::Base
        self.table_name = 'unhashed_upload_files'
      end

      def perform
        return unless migrate?

        clear_unhashed_upload_files
        store_unhashed_upload_files
        schedule_populate_untracked_uploads_jobs
      end

      private

      def migrate?
        UnhashedUploadFile.table_exists?
      end

      def clear_unhashed_upload_files
        # TODO
      end

      def store_unhashed_upload_files
        # TODO
      end

      def schedule_populate_untracked_uploads_jobs
        # TODO
      end
    end
  end
end