summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190612171003_add_index_on_job_artifacts_file_type.rb16
-rw-r--r--db/schema.rb2
2 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20190612171003_add_index_on_job_artifacts_file_type.rb b/db/migrate/20190612171003_add_index_on_job_artifacts_file_type.rb
new file mode 100644
index 00000000000..f5f82cda5ba
--- /dev/null
+++ b/db/migrate/20190612171003_add_index_on_job_artifacts_file_type.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+class AddIndexOnJobArtifactsFileType < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :ci_job_artifacts, :file_type
+ end
+
+ def down
+ remove_concurrent_index :ci_job_artifacts, :file_type
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index c57a73c66da..a7de356eefb 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20190611161641) do
+ActiveRecord::Schema.define(version: 20190612171003) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"