diff options
Diffstat (limited to 'db')
3 files changed, 35 insertions, 1 deletions
diff --git a/db/migrate/20190801193427_rename_application_settings_snowplow_collector_uri_column.rb b/db/migrate/20190801193427_rename_application_settings_snowplow_collector_uri_column.rb new file mode 100644 index 00000000000..a4bd5841a46 --- /dev/null +++ b/db/migrate/20190801193427_rename_application_settings_snowplow_collector_uri_column.rb @@ -0,0 +1,17 @@ +# 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 diff --git a/db/post_migrate/20190802091750_cleanup_application_settings_snowplow_collector_uri_rename.rb b/db/post_migrate/20190802091750_cleanup_application_settings_snowplow_collector_uri_rename.rb new file mode 100644 index 00000000000..768ece925c6 --- /dev/null +++ b/db/post_migrate/20190802091750_cleanup_application_settings_snowplow_collector_uri_rename.rb @@ -0,0 +1,17 @@ +# 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 diff --git a/db/schema.rb b/db/schema.rb index 828e36aa96c..2fac2c01e00 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -195,7 +195,6 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do t.boolean "pseudonymizer_enabled", default: false, null: false t.boolean "hide_third_party_offers", 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_cookie_domain" t.boolean "instance_statistics_visibility_private", default: false, null: false @@ -231,6 +230,7 @@ ActiveRecord::Schema.define(version: 2019_08_02_235445) do 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_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 ["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" |