You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "raghulprashath (via GitHub)" <gi...@apache.org> on 2023/09/20 14:29:36 UTC

[GitHub] [superset] raghulprashath commented on pull request #25320: fix: Add explicit ON DELETE CASCADE for dashboard_roles

raghulprashath commented on PR #25320:
URL: https://github.com/apache/superset/pull/25320#issuecomment-1727848957

   This caused migration failure in 3.0.0rc3.
   The solution should be 
   
   ```
   DashboardRoles = Table(
       "dashboard_roles",
       metadata,
       Column("id", Integer, primary_key=True),
       Column(
           "dashboard_id",
           Integer,
           ForeignKey("dashboards.id", ondelete="CASCADE"),
           nullable=False,
       ),
       Column(
           "role_id",
           Integer,
           ForeignKey("ab_role.id", ondelete="CASCADE"),
           nullable=False,
       ),
   )
   ```
   
   should delete ondelete cascade on the foreign key, not the entire column


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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