summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-03 17:08:06 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-03 17:08:06 +0200
commitdd74237ddc8bef97e45757caf2e91f157e7dd7d2 (patch)
treec4dcadc2fa1a08fd692a4ec22e9614e925010fd1
parent794ac6c5421e04056dfd336559786fb166c9fa0a (diff)
downloadgitlab-ce-dd74237ddc8bef97e45757caf2e91f157e7dd7d2.tar.gz
Split migration to add and index namespaces.runners_token
-rw-r--r--db/migrate/20170906133745_add_runners_token_to_groups.rb10
-rw-r--r--db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb14
-rw-r--r--db/schema.rb2
3 files changed, 16 insertions, 10 deletions
diff --git a/db/migrate/20170906133745_add_runners_token_to_groups.rb b/db/migrate/20170906133745_add_runners_token_to_groups.rb
index 54d0fddd5e3..852f4cba670 100644
--- a/db/migrate/20170906133745_add_runners_token_to_groups.rb
+++ b/db/migrate/20170906133745_add_runners_token_to_groups.rb
@@ -3,15 +3,7 @@ class AddRunnersTokenToGroups < ActiveRecord::Migration
DOWNTIME = false
- disable_ddl_transaction!
-
- def up
+ def change
add_column :namespaces, :runners_token, :string
-
- add_concurrent_index :namespaces, :runners_token, unique: true
- end
-
- def down
- remove_column :namespaces, :runners_token
end
end
diff --git a/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb b/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
new file mode 100644
index 00000000000..d6c4a5c432c
--- /dev/null
+++ b/db/migrate/20180503150427_add_index_to_namespaces_runners_token.rb
@@ -0,0 +1,14 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddIndexToNamespacesRunnersToken < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def change
+ add_concurrent_index :namespaces, :runners_token, unique: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index c88d6f3f9e9..177ad0bf23e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20180430143705) do
+ActiveRecord::Schema.define(version: 20180503150427) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"