tau-mask opened a new issue #18314:
URL: https://github.com/apache/airflow/issues/18314


   ### Apache Airflow version
   
   2.1.3 (latest released)
   
   ### Operating System
   
   Ubuntu 20.04
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   After upgrading from v2.1.2 to v2.1.3, the scheduler won't start because of 
a missing column `queued_at` in the table `airflow_db.dag_run`:
   
   ```
   sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 
1054 (42S22): Unknown column 'queued_at' in 'field list'
   [SQL: INSERT INTO airflow_db.dag_run (dag_id, queued_at, execution_date, 
start_date, end_date, state, run_id, creating_job_id, external_trigger, 
run_type, conf, last_scheduling_decision, dag_hash) VALUES (%(dag_id)s, 
%(queued_at)s, %(execution_date)s, %(start_date)s, %(end_date)s, %(state)s, 
%(run_id)s, %(creating_job_id)s, %(external_trigger)s, %(run_type)s, %(conf)s, 
%(last_scheduling_decision)s, %(dag_hash)s)]
   [parameters: {'dag_id': 'perforce_submits_tags_dev', 'queued_at': 
datetime.datetime(2021, 9, 17, 3, 49, 21, 590549), 'execution_date': 
datetime.datetime(2021, 9, 16, 23, 5), 'start_date': None, 'end_date': None, 
'state': <TaskInstanceState.QUEUED: 'queued'>, 'run_id': 
'scheduled__2021-09-16T23:05:00+00:00', 'creating_job_id': 64538, 
'external_trigger': 0, 'run_type': <DagRunType.SCHEDULED: 'scheduled'>, 'conf': 
b'\x80\x05}\x94.', 'last_scheduling_decision': None, 'dag_hash': 
'7a12e79b01b2b946cf6ad9bca1eec775'}]
   ```
   
   ### What you expected to happen
   
   I expected the scheduler to start. But beyond that, I think that adding a 
column to the database constitutes a minor level change, not a patch level 
change (i.e. 2.2.x rather than 2.1.x). I also have no idea how to fix it 
besides wiping out the database and recreating it from scratch, or adding that 
column myself manually. If there's a way to do that properly from the command 
line, I couldn't find the documentation.
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to