Hello <@ULVA73B9P>, If I delete a flow_run and a t...
# ask-marvin
a
Hello @Marvin, If I delete a flow_run and a task_run from the database, will that delete its associated flow_run_state and task_run_state in the database?
m
To provide you with the most accurate answer, I need to know which version of Prefect you are using. If you could confirm whether it's 2.x or a later version, I can look up the right documentation for you!
a
@Marvin 2.19.3
m
The current documentation doesn't provide specific information about whether deleting a
flow_run
or
task_run
will automatically delete its associated
flow_run_state
or
task_run_state
. Generally, in database management, cascading deletes aren't assumed unless explicitly stated. However, Prefect might handle this with special logic not covered in the available excerpts. Since the documentation doesn't provide clarity, I recommend checking with Prefect's API or raising a question with their support or community for an authoritative answer. Alternatively, if the environment allows, testing this in a safe setting could help observe the behavior directly. For more detailed exploration, you may refer to Prefect's state management or client handling guides here and here.