villebro commented on a change in pull request #9882: URL: https://github.com/apache/incubator-superset/pull/9882#discussion_r429751500
########## File path: superset/connectors/sqla/models.py ########## @@ -373,7 +373,11 @@ class SqlaTable(Model, BaseDatasource): owner_class = security_manager.user_model __tablename__ = "tables" - __table_args__ = (UniqueConstraint("database_id", "table_name"),) + __table_args__ = ( + UniqueConstraint( + "database_id", "schema", "table_name", name="_customer_location_uc", + ), + ) Review comment: Ping @john-bodley . I've been meaning to bring this up for discussion, as I also feel schema should be included in the constraint. However, I remember you had done work in this area before, and there was some reason why it wasn't possible to include schema in the unique constraint. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org