mrshu commented on issue #5452: [schema] Updating the base column schema URL: https://github.com/apache/incubator-superset/pull/5452#issuecomment-547141728 I came here to quickly mention that the following sentence added to `UPDATING.md` has turned out to be a bit of an understatement for us, as we've updated from v29 to v34 over this past weekend: > Depending on the integrity of the data, manual intervention may be required Only later, when presented with exceptions of the following sort ``` sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry 'week-21' for key 'uq_table_columns_column_name'") [SQL: ALTER TABLE table_columns ADD CONSTRAINT uq_table_columns_column_name UNIQUE (column_name, table_id)] (Background on this error at: http://sqlalche.me/e/gkpj) ``` did we find out that the actual problem was that we had schema columns and so called _calculated columns_ whose lowercase representation turned out to be the same (i.e. `week` as a schema column and `WEEK` as a calculated column). Since the constraint added in this PR only considers their lowercased forms, many queries finished with integrity errors. The fix was quite straightforward (ensure there are no overlapping lowercase names for schema and calculated columns) but was quite hard to find. I was therefore wondering if something like this would be worth adding to `UPDATING.md`, so that we may prevent someone else's surprise when their new version of Superset does not work after upgrade. Thanks!
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
