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 2019/11/15 00:47:26 UTC

[GitHub] [incubator-superset] nytai commented on issue #8316: Include schema on sqlatable's unique constraint

nytai commented on issue #8316: Include schema on sqlatable's unique constraint
URL: https://github.com/apache/incubator-superset/issues/8316#issuecomment-554156412
 
 
   @aspedrosa There was actually a [migration](https://github.com/preset-io/incubator-superset/blob/master/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py) to introduce the change you're proposing. 
   
   I've opened a [PR](https://github.com/apache/incubator-superset/pull/8578) to reflect that change in the model.
   
   If you're running SQLite that migration fails with 
   
   `NotImplementedError: No support for ALTER of constraints in SQLite dialect`
   
   since SQLite does not support ALTER statements. This could be fixed my running a migration to recreate the entire table, but changing the uniqueness constraint, but that seems a little excessive. I'd suggest running another database, that supports altering a constraint, as your main/metadata db (I tested with postgres and was able to import multiple tables with the same name but different schemas).
   
    Regarding:
   >To prevent having several tables with the same name and database on the list endpoint of the tablemodelview I would also add the schema to the list_columns
   
   If you include a schema when importing a table, the table name will appear as `[schema].[table]` in the list view. 
   
   
   

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