-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ORM vs migration files inconsistencies #44221
Conversation
031bfd8
to
4ac20ad
Compare
4ac20ad
to
4538776
Compare
4538776
to
5f5adbc
Compare
airflow/migrations/versions/0032_3_0_0_drop_execution_date_unique.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_xcom_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_xcom_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_xcom_table.py
Outdated
Show resolved
Hide resolved
airflow/migrations/versions/0050_3_0_0_remove_pickled_data_from_xcom_table.py
Outdated
Show resolved
Hide resolved
5f5adbc
to
47128e9
Compare
de89bce
to
ea2d0d4
Compare
e32cc49
to
bf818bd
Compare
oh, huh, we can remove the def get_current_table_names():
connection = op.get_bind()
metadata = MetaData()
metadata.reflect(bind=connection)
return metadata.tables.keys() or Lines 1008 to 1029 in 761cedd
|
I think that would not work well with offline sql scripts. I’ll verify |
59e3756
to
ee9706c
Compare
Didn't think of using raw SQL. I just used it now. Let's see how it goes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment https://github.com/apache/airflow/pull/44221/files#r1854515334
59b3fd5
to
7b2433a
Compare
There have been some inconsistences between ORM and migration files but it doesn't fail in tests. This is an attempt to fix the inconsistency and also have it fail in tests
…eated by migration
7b2433a
to
9ce384a
Compare
* Fix ORM vs migration files inconsistencies There have been some inconsistences between ORM and migration files but it doesn't fail in tests. This is an attempt to fix the inconsistency and also have it fail in tests * fix for mysql and postgres * fixup! fix for mysql and postgres * fix for sqlite * fixup! fix for sqlite * fixup! fixup! fix for sqlite * use TIMESTAMP from db_types * skip_archive should not delete _xcom_archive tables since that was created by migration * fix conflicts * fixup! fix conflicts * drop _xcom_archive table if it exists * use sql for dropping xcom_archive table * fix conflicts * remove added migration file and make it work in one file
* Fix ORM vs migration files inconsistencies There have been some inconsistences between ORM and migration files but it doesn't fail in tests. This is an attempt to fix the inconsistency and also have it fail in tests * fix for mysql and postgres * fixup! fix for mysql and postgres * fix for sqlite * fixup! fix for sqlite * fixup! fixup! fix for sqlite * use TIMESTAMP from db_types * skip_archive should not delete _xcom_archive tables since that was created by migration * fix conflicts * fixup! fix conflicts * drop _xcom_archive table if it exists * use sql for dropping xcom_archive table * fix conflicts * remove added migration file and make it work in one file
There have been some inconsistences between ORM and migration files but it doesn't fail in tests. This is an attempt to fix the inconsistency and also have it fail in tests