Commit 8d659869 authored by Thong Kuah's avatar Thong Kuah

Merge branch '13201-rename-snowplow_collector_uri-to-snowplow_collector_hostname' into 'master'

Add migration for CE as well

Closes #13201

See merge request gitlab-org/gitlab-ce!31405
parents 84e7bc76 a98493ed
# frozen_string_literal: true
class RenameApplicationSettingsSnowplowCollectorUriColumn < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
rename_column_concurrently :application_settings, :snowplow_collector_uri, :snowplow_collector_hostname
end
def down
cleanup_concurrent_column_rename :application_settings, :snowplow_collector_hostname, :snowplow_collector_uri
end
end
# frozen_string_literal: true
class CleanupApplicationSettingsSnowplowCollectorUriRename < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
cleanup_concurrent_column_rename :application_settings, :snowplow_collector_uri, :snowplow_collector_hostname
end
def down
rename_column_concurrently :application_settings, :snowplow_collector_hostname, :snowplow_collector_uri
end
end
...@@ -195,7 +195,6 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do ...@@ -195,7 +195,6 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do
t.boolean "pseudonymizer_enabled", default: false, null: false t.boolean "pseudonymizer_enabled", default: false, null: false
t.boolean "hide_third_party_offers", default: false, null: false t.boolean "hide_third_party_offers", default: false, null: false
t.boolean "snowplow_enabled", default: false, null: false t.boolean "snowplow_enabled", default: false, null: false
t.string "snowplow_collector_uri"
t.string "snowplow_site_id" t.string "snowplow_site_id"
t.string "snowplow_cookie_domain" t.string "snowplow_cookie_domain"
t.boolean "instance_statistics_visibility_private", default: false, null: false t.boolean "instance_statistics_visibility_private", default: false, null: false
...@@ -231,6 +230,7 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do ...@@ -231,6 +230,7 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do
t.integer "raw_blob_request_limit", default: 300, null: false t.integer "raw_blob_request_limit", default: 300, null: false
t.boolean "allow_local_requests_from_web_hooks_and_services", default: false, null: false t.boolean "allow_local_requests_from_web_hooks_and_services", default: false, null: false
t.boolean "allow_local_requests_from_system_hooks", default: true, null: false t.boolean "allow_local_requests_from_system_hooks", default: true, null: false
t.string "snowplow_collector_hostname"
t.index ["custom_project_templates_group_id"], name: "index_application_settings_on_custom_project_templates_group_id" t.index ["custom_project_templates_group_id"], name: "index_application_settings_on_custom_project_templates_group_id"
t.index ["file_template_project_id"], name: "index_application_settings_on_file_template_project_id" t.index ["file_template_project_id"], name: "index_application_settings_on_file_template_project_id"
t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id" t.index ["usage_stats_set_by_user_id"], name: "index_application_settings_on_usage_stats_set_by_user_id"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment