summaryrefslogtreecommitdiff
path: root/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20170327091750_add_created_at_index_to_deployments.rb')
-rw-r--r--db/migrate/20170327091750_add_created_at_index_to_deployments.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
new file mode 100644
index 00000000000..fd6ed499b80
--- /dev/null
+++ b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb
@@ -0,0 +1,15 @@
+class AddCreatedAtIndexToDeployments < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :deployments, :created_at
+ end
+
+ def down
+ remove_concurrent_index :deployments, :created_at
+ end
+end