summaryrefslogtreecommitdiff
path: root/db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb')
-rw-r--r--db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb b/db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb
new file mode 100644
index 00000000000..5f60a7f25c2
--- /dev/null
+++ b/db/migrate/20210527130524_rename_experiment_subjects_group_id_to_namespace_id.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RenameExperimentSubjectsGroupIdToNamespaceId < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers::V2
+
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :experiment_subjects, :group_id, :namespace_id
+ end
+
+ def down
+ undo_rename_column_concurrently :experiment_subjects, :group_id, :namespace_id
+ end
+end