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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 21:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 21:08:58 +0300
commit1ca9950d5f890cd8f185e1eda158b969a7244fe2 (patch)
tree6f62715938a4b2b001705c51c697609a8e0850ae /db
parentbcc77054ee9aefd1e332e04a4189390fd5a3112e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20200123092602_rename_services_template_to_instance.rb17
-rw-r--r--db/post_migrate/20191021101942_remove_empty_github_service_templates.rb4
-rw-r--r--db/post_migrate/20200123101859_cleanup_rename_services_template_to_instance.rb17
-rw-r--r--db/post_migrate/20200206111847_migrate_propagate_service_template_sidekiq_queue.rb15
-rw-r--r--db/schema.rb4
5 files changed, 2 insertions, 55 deletions
diff --git a/db/migrate/20200123092602_rename_services_template_to_instance.rb b/db/migrate/20200123092602_rename_services_template_to_instance.rb
deleted file mode 100644
index 42964dfe348..00000000000
--- a/db/migrate/20200123092602_rename_services_template_to_instance.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class RenameServicesTemplateToInstance < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- rename_column_concurrently :services, :template, :instance
- end
-
- def down
- undo_rename_column_concurrently :services, :template, :instance
- end
-end
diff --git a/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb b/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb
index 2f9db9e2cf6..64abe93b3e8 100644
--- a/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb
+++ b/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb
@@ -23,10 +23,6 @@ class RemoveEmptyGithubServiceTemplates < ActiveRecord::Migration[5.2]
private
def relationship
- # The column `template` was renamed to `instance`. Column information needs
- # to be resetted to avoid cache problems after migrating down.
- RemoveEmptyGithubServiceTemplates::Service.reset_column_information
-
RemoveEmptyGithubServiceTemplates::Service.where(template: true, type: 'GithubService')
end
end
diff --git a/db/post_migrate/20200123101859_cleanup_rename_services_template_to_instance.rb b/db/post_migrate/20200123101859_cleanup_rename_services_template_to_instance.rb
deleted file mode 100644
index 904cad616d7..00000000000
--- a/db/post_migrate/20200123101859_cleanup_rename_services_template_to_instance.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-class CleanupRenameServicesTemplateToInstance < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- cleanup_concurrent_column_rename :services, :template, :instance
- end
-
- def down
- undo_cleanup_concurrent_column_rename :services, :template, :instance
- end
-end
diff --git a/db/post_migrate/20200206111847_migrate_propagate_service_template_sidekiq_queue.rb b/db/post_migrate/20200206111847_migrate_propagate_service_template_sidekiq_queue.rb
deleted file mode 100644
index 30f6c2038d9..00000000000
--- a/db/post_migrate/20200206111847_migrate_propagate_service_template_sidekiq_queue.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# frozen_string_literal: true
-
-class MigratePropagateServiceTemplateSidekiqQueue < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- def up
- sidekiq_queue_migrate 'propagate_service_template', to: 'propagate_instance_level_service'
- end
-
- def down
- sidekiq_queue_migrate 'propagate_instance_level_service', to: 'propagate_service_template'
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index 6ddf61799e3..ecc4870b33d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3858,9 +3858,9 @@ ActiveRecord::Schema.define(version: 2020_02_07_151640) do
t.boolean "deployment_events", default: false, null: false
t.string "description", limit: 500
t.boolean "comment_on_event_enabled", default: true, null: false
- t.boolean "instance", default: false
- t.index ["instance"], name: "index_services_on_instance"
+ t.boolean "template", default: false
t.index ["project_id"], name: "index_services_on_project_id"
+ t.index ["template"], name: "index_services_on_template"
t.index ["type"], name: "index_services_on_type"
end