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

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

module Airflow
  class Dags < ApplicationRecord
    belongs_to :project

    validates :project, presence: true
    validates :dag_name, length: { maximum: 255 }, presence: true
    validates :schedule, length: { maximum: 255 }
    validates :fileloc, length: { maximum: 255 }

    scope :by_project_id, ->(project_id) { where(project_id: project_id).order(id: :asc) }
  end
end