Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ai/service_access_token.rb')
-rw-r--r--app/models/ai/service_access_token.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/models/ai/service_access_token.rb b/app/models/ai/service_access_token.rb
index b8a2a271976..46dfbe9078c 100644
--- a/app/models/ai/service_access_token.rb
+++ b/app/models/ai/service_access_token.rb
@@ -2,11 +2,13 @@
module Ai
class ServiceAccessToken < ApplicationRecord
+ include IgnorableColumns
self.table_name = 'service_access_tokens'
+ ignore_column :category, remove_with: '16.8', remove_after: '2024-01-22'
+
scope :expired, -> { where('expires_at < :now', now: Time.current) }
scope :active, -> { where('expires_at > :now', now: Time.current) }
- scope :for_category, ->(category) { where(category: category) }
attr_encrypted :token,
mode: :per_attribute_iv,
@@ -16,11 +18,5 @@ module Ai
encode_iv: false
validates :token, :expires_at, presence: true
-
- enum category: {
- code_suggestions: 1
- }
-
- validates :category, presence: true
end
end