ashb commented on a change in pull request #7217: [AIRFLOW-5946] Store source code in db URL: https://github.com/apache/airflow/pull/7217#discussion_r383196969
########## File path: airflow/models/dagcode.py ########## @@ -0,0 +1,108 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import logging +from typing import List + +from sqlalchemy import Column, Index, Integer, String, Text, and_ + +from airflow.models import Base +from airflow.utils import timezone +from airflow.utils.session import provide_session +from airflow.utils.sqlalchemy import UtcDateTime + +log = logging.getLogger(__name__) + + +class DagCodeModel(Base): Review comment: ```suggestion class DagCode(Base): ``` `Model` suffix is not needed here. We only have it on `Dag` to distinguish between the DAG class and the "ORM"/Database record type. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
