diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 12:09:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 12:09:03 +0000 |
commit | 5366964a10484c2783a646b35a6da9eece01b242 (patch) | |
tree | 4a5a7a289d44e63d96a50a6a64db6e16b871f19c /db | |
parent | 733befe96ad19f5a02e442c4a9cc8059d3aabbda (diff) | |
download | gitlab-ce-5366964a10484c2783a646b35a6da9eece01b242.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
3 files changed, 45 insertions, 0 deletions
diff --git a/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb b/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb new file mode 100644 index 00000000000..5e035f91f24 --- /dev/null +++ b/db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +class AddFieldsToApplicationSettingsForMergeRequestsApprovals < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def up + add_column(:application_settings, + :disable_overriding_approvers_per_merge_request, + :boolean, + default: false, + null: false) + add_column(:application_settings, + :prevent_merge_requests_author_approval, + :boolean, + default: false, + null: false) + add_column(:application_settings, + :prevent_merge_requests_committers_approval, + :boolean, + default: false, + null: false) + end + + def down + remove_column(:application_settings, :disable_overriding_approvers_per_merge_request) + remove_column(:application_settings, :prevent_merge_requests_author_approval) + remove_column(:application_settings, :prevent_merge_requests_committers_approval) + end +end diff --git a/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb b/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb new file mode 100644 index 00000000000..476b3de659a --- /dev/null +++ b/db/migrate/20200210135504_remove_packages_deprecated_dependencies.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class RemovePackagesDeprecatedDependencies < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + execute('DELETE FROM packages_dependency_links WHERE dependency_type = 5') + end + + def down + # There is nothing to do to reverse this migration + end +end diff --git a/db/schema.rb b/db/schema.rb index 178a5c299bc..bce47ba1c72 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -346,6 +346,9 @@ ActiveRecord::Schema.define(version: 2020_02_13_204737) do t.integer "elasticsearch_indexed_field_length_limit", default: 0, null: false t.integer "elasticsearch_max_bulk_size_mb", limit: 2, default: 10, null: false t.integer "elasticsearch_max_bulk_concurrency", limit: 2, default: 10, null: false + t.boolean "disable_overriding_approvers_per_merge_request", default: false, null: false + t.boolean "prevent_merge_requests_author_approval", default: false, null: false + t.boolean "prevent_merge_requests_committers_approval", default: false, null: false 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 ["instance_administration_project_id"], name: "index_applicationsettings_on_instance_administration_project_id" |