diff options
Diffstat (limited to 'db')
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 |