diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-19 21:14:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-19 21:14:01 +0300 |
commit | d738ba980c5ce598811b700e215ab957132f3a67 (patch) | |
tree | 5f866d1448f5b670f834fb19a8c4082e839bfac0 /app/models/container_repository.rb | |
parent | b22f3af733282394aa18261c073adbec117a1d47 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r-- | app/models/container_repository.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index c914819f79d..b03d946fc47 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -13,9 +13,15 @@ class ContainerRepository < ApplicationRecord validates :name, length: { minimum: 0, allow_nil: false } validates :name, uniqueness: { scope: :project_id } + validates :migration_state, presence: true + + validates :migration_retries_count, presence: true, + numericality: { greater_than_or_equal_to: 0 }, + allow_nil: false enum status: { delete_scheduled: 0, delete_failed: 1 } enum expiration_policy_cleanup_status: { cleanup_unscheduled: 0, cleanup_scheduled: 1, cleanup_unfinished: 2, cleanup_ongoing: 3 } + enum migration_skipped_reason: { not_in_plan: 0, too_many_retries: 1, too_many_tags: 2, root_namespace_in_deny_list: 3 } delegate :client, to: :registry |