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 2020/10/03 23:51:51 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #9882: fix: old unique constraint remnance

john-bodley commented on a change in pull request #9882:
URL: https://github.com/apache/incubator-superset/pull/9882#discussion_r499191504



##########
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:
       Having multiple Superset datasources with the same schema and table name for a given database does not sense to me as it is not easily apparent from the current UI which datasource is being referenced as the name if the primary indicator throughout the application.




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



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