diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 09:08:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 09:08:52 +0000 |
commit | 53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (patch) | |
tree | 5180b96d6a84f36a515cedfa8e81d72de5ccf4fb /db | |
parent | cfe63cce6a90a1c70397c1b9f6d90480f25cae0a (diff) | |
download | gitlab-ce-53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb | 9 | ||||
-rw-r--r-- | db/post_migrate/20200210062432_schedule_link_lfs_objects.rb | 23 | ||||
-rw-r--r-- | db/schema.rb | 1 |
3 files changed, 11 insertions, 22 deletions
diff --git a/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb b/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb new file mode 100644 index 00000000000..6a222ce8d51 --- /dev/null +++ b/db/migrate/20200124143014_add_restrict_deployment_order_to_project_ci_cd_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddRestrictDeploymentOrderToProjectCiCdSettings < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def change + add_column :project_ci_cd_settings, :forward_deployment_enabled, :boolean + end +end diff --git a/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb b/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb index c955639c259..b401065dd94 100644 --- a/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb +++ b/db/post_migrate/20200210062432_schedule_link_lfs_objects.rb @@ -4,32 +4,11 @@ class ScheduleLinkLfsObjects < ActiveRecord::Migration[6.0] include Gitlab::Database::MigrationHelpers DOWNTIME = false - MIGRATION = 'LinkLfsObjects' - BATCH_SIZE = 1_000 disable_ddl_transaction! - class Project < ActiveRecord::Base - include EachBatch - - self.table_name = 'projects' - end - def up - fork_network_members = - Gitlab::BackgroundMigration::LinkLfsObjects::ForkNetworkMember - .select(1) - .with_non_existing_lfs_objects - .where('fork_network_members.project_id = projects.id') - - forks = Project.where('EXISTS (?)', fork_network_members) - - queue_background_migration_jobs_by_range_at_intervals( - forks, - MIGRATION, - BackgroundMigrationWorker.minimum_interval, - batch_size: BATCH_SIZE - ) + # no-op as background migration being schedule times out in some instances end def down diff --git a/db/schema.rb b/db/schema.rb index f95662582ec..7b27b2524ce 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -3166,6 +3166,7 @@ ActiveRecord::Schema.define(version: 2020_02_13_204737) do t.boolean "group_runners_enabled", default: true, null: false t.boolean "merge_pipelines_enabled" t.integer "default_git_depth" + t.boolean "forward_deployment_enabled" t.index ["project_id"], name: "index_project_ci_cd_settings_on_project_id", unique: true end |