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

raw_usage_data.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6fe3b26b58b715aaef1f1953e5f35ebed5345e98 (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

class RawUsageData < ApplicationRecord
  validates :payload, presence: true
  validates :recorded_at, presence: true, uniqueness: true

  def update_version_metadata!(usage_data_id:)
    self.update_columns(sent_at: Time.current, version_usage_data_id_value: usage_data_id)
  end
end