ephraimbuddy commented on a change in pull request #22353:
URL: https://github.com/apache/airflow/pull/22353#discussion_r829566101



##########
File path: tests/utils/test_db.py
##########
@@ -54,23 +54,6 @@ def 
test_database_schema_and_sqlalchemy_model_are_in_sync(self):
             # ignore indices created by celery
             lambda t: (t[0] == 'remove_index' and t[1].name == 'task_id'),
             lambda t: (t[0] == 'remove_index' and t[1].name == 'taskset_id'),
-            # Ignore all the fab tables
-            lambda t: (t[0] == 'remove_table' and t[1].name == 
'ab_permission'),

Review comment:
       We have to monitor these now and ensure they are in sync

##########
File path: 
airflow/migrations/versions/0058_03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
##########
@@ -40,57 +38,23 @@
 
 def upgrade():
     """Apply Increase length of ``Flask-AppBuilder`` ``ab_view_menu.name`` 
column"""
-    conn = op.get_bind()
-    inspector = inspect(conn)
-    tables = inspector.get_table_names()
-
-    if "ab_view_menu" in tables:
-        if conn.dialect.name == "sqlite":
-            op.execute("PRAGMA foreign_keys=off")
-            op.execute(
-                """
-            CREATE TABLE IF NOT EXISTS ab_view_menu_dg_tmp
-            (
-                id INTEGER NOT NULL PRIMARY KEY,
-                name VARCHAR(250) NOT NULL UNIQUE
-            );

Review comment:
       This migration dropped the unique key constraint on the name for SQLite. 
I had to do it with batch mode since there's now batch mode support




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to