john-bodley commented on issue #5452: [schema] Updating the base column schema URL: https://github.com/apache/incubator-superset/pull/5452#issuecomment-547210849 Hi Marek, I created https://github.com/apache/incubator-superset/pull/8465 which updates the UPDATING.md to mention that the addition of uniqueness constraints may be case insensitive depending on the database configuration. -John On Mon, Oct 28, 2019 at 1:55 PM Marek Šuppa <[email protected]> wrote: > 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! > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/apache/incubator-superset/pull/5452?email_source=notifications&email_token=ABC3BTJJENZ76IHQFT5L3RLQQ5GTTA5CNFSM4FLFRQK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECOLQYA#issuecomment-547141728>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABC3BTJZKXSSAN6GSKJEJ3LQQ5GTTANCNFSM4FLFRQKQ> > . >
---------------------------------------------------------------- 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]
