cansjt commented on issue #17374:
URL: https://github.com/apache/airflow/issues/17374#issuecomment-890952199


   Well it is not the only issue I am facing with upgrading to Airflow 2.x. So 
I would like to sort those out first. But I'll see what I can do.
   
   With respect to the migration, it might be quite tricky as, as I mentioned, 
the migrations created the table in the right schema (`airflow` in our case), 
but the application created others in the `public` schema.
   
   To make matter worse both contain data. As we did not yet define any role 
etc. they seem to only contain the base permissions, but even those are not 
create in a very deterministic matters: _e.g._ a given permission (row in the 
`ab_permission` table) may not have the same ID in  both tables.
   
   Would this migration strategy makes sense:
   if the schema in airflow configuration is `None` or `public`:
   - do nothing;
   else:
   - assume the tables in the public are the correct ones
   - truncate those in the `<other>` schema;
   - fill them back with the table in the `<other>` content of the tables in 
the `public` schema;
   - drop the tables in the public schema;
   
   Or is there a more clever way to do it ? (again, I never used Flask 
AppBuilder before)


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