You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/20 22:20:00 UTC

[GitHub] john-bodley opened a new pull request #5449: [schema] Updating the tables schema

john-bodley opened a new pull request #5449: [schema] Updating the tables schema
URL: https://github.com/apache/incubator-superset/pull/5449
 
 
   We've noticed a number of anomalies in our database caused by ill-defined forms and/or table schema definitions. This PR resolves a number of issues related to the `tables` table including:
   - Modifying the uniqueness constraint defined by PR https://github.com/apache/incubator-superset/pull/3978 to include the schema name (previously it was only based on the database/table). Note in order for the uniqueness constraint to be valid I needed to decrease the length of `schema` and `table_name` to 127 characters. Most databases actually have a 64 character limit.
   - PR  https://github.com/apache/incubator-superset/pull/3978 never created a migration to add the uniqueness constraint.
   - Removed the pre-add for checking for uniqueness. This is no longer required as the uniqueness constraint defines the same logic. This also only worked when adding a table and thus it was possible to have duplicates names if someone edited the form.
   - Added a form validation to ensure that the schema name was not part of the table name. 
   - Ensuring the `table_name` column was non-nullable.
   
   Note that prior to running the migration one may have to manually make changes to the `tables` table by consolidating duplicate or non-valid records given there's no way of programmatically fixing corrupt records.
   
   to: @fabianmenges @graceguo-supercat @michellethomas @mistercrunch @timifasubaa 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org