diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-16 16:05:03 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-16 16:05:03 +0100 |
commit | d2d64393ed0e64fd63981d5d02fee52fa16a081c (patch) | |
tree | f3e105279a5c0c77cd09a2d7d5757bdf21536d8e /db/migrate | |
parent | d64183e1fa26ab77107e3a2a20be1fe4df3a1875 (diff) | |
parent | b7aae9a6cde71dfc448d8da34ebe38104068387c (diff) | |
download | gitlab-ce-d2d64393ed0e64fd63981d5d02fee52fa16a081c.tar.gz |
Merge remote-tracking branch 'origin/master' into chat-name-authorize
Diffstat (limited to 'db/migrate')
3 files changed, 32 insertions, 14 deletions
diff --git a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb index fad62d716b3..4da5ec9bd28 100644 --- a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb +++ b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb @@ -5,10 +5,7 @@ class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration disable_ddl_transaction! def up - add_column_with_default(:projects, - :only_allow_merge_if_all_discussions_are_resolved, - :boolean, - default: false) + add_column :projects, :only_allow_merge_if_all_discussions_are_resolved, :boolean end def down diff --git a/db/migrate/20161011222551_remove_inactive_jira_service_properties.rb b/db/migrate/20161011222551_remove_inactive_jira_service_properties.rb deleted file mode 100644 index 319d86ac159..00000000000 --- a/db/migrate/20161011222551_remove_inactive_jira_service_properties.rb +++ /dev/null @@ -1,10 +0,0 @@ -class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - - DOWNTIME = true - DOWNTIME_REASON = "Removes all inactive jira_service properties" - - def up - execute("UPDATE services SET properties = '{}' WHERE services.type = 'JiraService' and services.active = false") - end -end diff --git a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb new file mode 100644 index 00000000000..e644a174964 --- /dev/null +++ b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb @@ -0,0 +1,31 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :application_settings, :sidekiq_throttling_enabled, :boolean, default: false + add_column :application_settings, :sidekiq_throttling_queues, :string + add_column :application_settings, :sidekiq_throttling_factor, :decimal + end +end |