summaryrefslogtreecommitdiff
path: root/db/migrate/20200925114522_create_bulk_import_entities.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /db/migrate/20200925114522_create_bulk_import_entities.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'db/migrate/20200925114522_create_bulk_import_entities.rb')
-rw-r--r--db/migrate/20200925114522_create_bulk_import_entities.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/db/migrate/20200925114522_create_bulk_import_entities.rb b/db/migrate/20200925114522_create_bulk_import_entities.rb
new file mode 100644
index 00000000000..c78c4aee9ae
--- /dev/null
+++ b/db/migrate/20200925114522_create_bulk_import_entities.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+
+class CreateBulkImportEntities < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ create_table :bulk_import_entities, if_not_exists: true do |t|
+ t.bigint :bulk_import_id, index: true, null: false
+ t.bigint :parent_id, index: true
+ t.bigint :namespace_id, index: true
+ t.bigint :project_id, index: true
+
+ t.integer :source_type, null: false, limit: 2
+ t.text :source_full_path, null: false
+
+ t.text :destination_name, null: false
+ t.text :destination_namespace, null: false
+
+ t.integer :status, null: false, limit: 2
+ t.text :jid
+
+ t.timestamps_with_timezone
+ end
+
+ add_text_limit(:bulk_import_entities, :source_full_path, 255)
+ add_text_limit(:bulk_import_entities, :destination_name, 255)
+ add_text_limit(:bulk_import_entities, :destination_namespace, 255)
+ add_text_limit(:bulk_import_entities, :jid, 255)
+ end
+
+ def down
+ drop_table :bulk_import_entities
+ end
+end