[AIRFLOW-4867] check if table exists before creating#5592
[AIRFLOW-4867] check if table exists before creating#5592dszakallas wants to merge 1 commit intoapache:masterfrom dszakallas:fix-migration-script-cf5dc11e79ad
Conversation
Fix migration script by only creating tables if they not already exist.
|
The "up" migration for this table drops those two tables. Do you know how you ended up with this migration being recorded as applied when it hadn't dropped the tables? |
|
I updated the airflow version from 1.10.2 to 1.10.4b2. I didn't do any manual migrations. initdb should have taken care of it right? |
Codecov Report
@@ Coverage Diff @@
## master #5592 +/- ##
=========================================
+ Coverage 78.95% 79.05% +0.1%
=========================================
Files 489 489
Lines 30684 30684
=========================================
+ Hits 24226 24257 +31
+ Misses 6458 6427 -31
Continue to review full report at Codecov.
|
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Make sure you have checked all steps below.
Jira
Description
needed to downgrade to Airflow 1.10.2 (db head rev 41f5f12752f8) from Airflow 1.10.4b2 (db head rev 004c1210f153).
When running
I faced the following error
I 'fixed' the migration script with only creating the tables if they exist:
After this fix the migrations successfully ran for me.
Tests
I don't think this can be unit tested.
Commits
Documentation
Code Quality
flake8