Skip to content

bug: harddelete command can fail to remove users due to foreign key on story map model #1541

@garobrik

Description

@garobrik

Description

See title.

Steps To Reproduce

See failing job: https://dashboard.render.com/web/srv-cclqgbirrk007qgqoml0

Additional context

StoryMap's created_by field is a non-nullable foreign key to the user's table with an on_delete policy of DO_NOTHING, which causes the underlying DB constraint to fail. We need to consult with product about how to handle this:

  • should we delete user's story maps when they delete their account? is there already an adequate warning message about this?
  • if we shouldn't, we need to change DO_NOTHING to SET_NULL and ensure that the rest of the system is equipped to handle this case (it probably isn't)

Size will depend on which of these two options we go with, first is very easy, second is probably easy-medium but hard to say without having touched the story maps code.

We can do a temporary fix without consulting product by just not hard deleting users for now.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions