summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-11-17 23:28:58 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-11-17 23:28:58 +0800
commita8a879eebc805f27de9eb27fa05bce291ee931ff (patch)
treebc7054b990df703cbfa1fc4aac77e87be2359fe8 /db/migrate
parent48090a9188e13e3ddaffb5957a7b5a264024f060 (diff)
parentaea8baed3093c513560e9ac5ac0c5c99508d3001 (diff)
downloadgitlab-ce-a8a879eebc805f27de9eb27fa05bce291ee931ff.tar.gz
Merge remote-tracking branch 'upstream/master' into feature/1376-allow-write-access-deploy-keys
* upstream/master: (236 commits) Mention Git strategy none Remove ToC since it's now supported in the docs portal itself Add 8.14 to versions with further additions to review apps Add Limitations sections to environments and review apps docs Add link to environments docs Fix URL to review apps docs Add a prerequisites section, add some links Link to NGINX example project for the time being Get rid most of the irrelevant sections Add note about current limitation in $CI_BUILD_REF_NAME Add an intro and an Overview section for Review Apps WIP review apps Add Review apps link to CI README Add stop environment permissions and remove delete Add note about auto-stopping of environments Update CHANGELOG.md for 8.13.6 Finish "Stopping envs" and "Grouping similar envs" sections Highlight first user autocomplete option Remove ToC and fix headings in Markdown docs Revert "Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' into 'master'" ...
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb5
-rw-r--r--db/migrate/20161011222551_remove_inactive_jira_service_properties.rb10
-rw-r--r--db/migrate/20161020075734_default_request_access_groups.rb12
-rw-r--r--db/migrate/20161020075830_default_request_access_projects.rb12
-rw-r--r--db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb31
5 files changed, 56 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/20161020075734_default_request_access_groups.rb b/db/migrate/20161020075734_default_request_access_groups.rb
new file mode 100644
index 00000000000..9721cc88724
--- /dev/null
+++ b/db/migrate/20161020075734_default_request_access_groups.rb
@@ -0,0 +1,12 @@
+class DefaultRequestAccessGroups < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+
+ def up
+ change_column_default :namespaces, :request_access_enabled, false
+ end
+
+ def down
+ change_column_default :namespaces, :request_access_enabled, true
+ end
+end
diff --git a/db/migrate/20161020075830_default_request_access_projects.rb b/db/migrate/20161020075830_default_request_access_projects.rb
new file mode 100644
index 00000000000..cb790291b24
--- /dev/null
+++ b/db/migrate/20161020075830_default_request_access_projects.rb
@@ -0,0 +1,12 @@
+class DefaultRequestAccessProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+
+ def up
+ change_column_default :projects, :request_access_enabled, false
+ end
+
+ def down
+ change_column_default :projects, :request_access_enabled, true
+ 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