From 5e5338cbed99ae1e7a087a43ab8231389d51565b Mon Sep 17 00:00:00 2001
From: George Koltsov <gkoltsov@gitlab.com>
Date: Wed, 11 Jan 2023 09:30:04 +0000
Subject: [PATCH] Add 'migrate_projects' column to bulk_import_entities table

Changelog: added
---
 ...1092510_add_migrate_projects_to_bulk_import_entities.rb | 7 +++++++
 db/schema_migrations/20230111092510                        | 1 +
 db/structure.sql                                           | 1 +
 3 files changed, 9 insertions(+)
 create mode 100644 db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb
 create mode 100644 db/schema_migrations/20230111092510

diff --git a/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb b/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb
new file mode 100644
index 000000000000..d09a796ba5c5
--- /dev/null
+++ b/db/migrate/20230111092510_add_migrate_projects_to_bulk_import_entities.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddMigrateProjectsToBulkImportEntities < Gitlab::Database::Migration[2.1]
+  def change
+    add_column :bulk_import_entities, :migrate_projects, :boolean, null: false, default: true
+  end
+end
diff --git a/db/schema_migrations/20230111092510 b/db/schema_migrations/20230111092510
new file mode 100644
index 000000000000..b84ab421d2d3
--- /dev/null
+++ b/db/schema_migrations/20230111092510
@@ -0,0 +1 @@
+d80ba166cee17bce1ac7825d9acdc9eeaf78aca5df276cfe2c3b2b076112dd1e
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 7815d81562dc..7eabdf1362ae 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -12462,6 +12462,7 @@ CREATE TABLE bulk_import_entities (
     created_at timestamp with time zone NOT NULL,
     updated_at timestamp with time zone NOT NULL,
     source_xid integer,
+    migrate_projects boolean DEFAULT true NOT NULL,
     CONSTRAINT check_13f279f7da CHECK ((char_length(source_full_path) <= 255)),
     CONSTRAINT check_715d725ea2 CHECK ((char_length(destination_name) <= 255)),
     CONSTRAINT check_796a4d9cc6 CHECK ((char_length(jid) <= 255)),
-- 
GitLab