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

20210414133310_add_bulk_import_export_uploads_table.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d20e57848e94cd2991d3df6aa7329c4fdca8a00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class AddBulkImportExportUploadsTable < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  def up
    create_table_with_constraints :bulk_import_export_uploads do |t|
      t.references :export, index: true, null: false, foreign_key: { to_table: :bulk_import_exports, on_delete: :cascade }
      t.datetime_with_timezone :updated_at, null: false
      t.text :export_file

      t.text_limit :export_file, 255
    end
  end

  def down
    drop_table :bulk_import_export_uploads
  end
end