diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 15:10:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 15:10:00 +0300 |
commit | 50ea04b6c6823aa1bd8d64cd9a77dcbd03b19053 (patch) | |
tree | de2a6a76b4943f71cf8fed80cd8734731ec0da5a /app/models/airflow | |
parent | 078e8bf78bfe2f41af6ca58858f093a53c719ba4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/airflow')
-rw-r--r-- | app/models/airflow/dags.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/airflow/dags.rb b/app/models/airflow/dags.rb new file mode 100644 index 00000000000..d17d4a4f3db --- /dev/null +++ b/app/models/airflow/dags.rb @@ -0,0 +1,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 |