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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20201112215132_swap_partitioned_audit_events.rb')
-rw-r--r--db/migrate/20201112215132_swap_partitioned_audit_events.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20201112215132_swap_partitioned_audit_events.rb b/db/migrate/20201112215132_swap_partitioned_audit_events.rb
new file mode 100644
index 00000000000..8360dbd4aa5
--- /dev/null
+++ b/db/migrate/20201112215132_swap_partitioned_audit_events.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class SwapPartitionedAuditEvents < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ replace_with_partitioned_table :audit_events
+ end
+
+ def down
+ rollback_replace_with_partitioned_table :audit_events
+ end
+end