chore(investigations): Delete unused cell models - #121906
Conversation
We switched the naming over to blocks, just removing these.
| @@ -1,205 +0,0 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
These were basically just testing the orm, I figured it was better to remove them.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e7d46b7. Configure here.
| SafeDeleteModel(name="InvestigationCell", deletion_action=DeletionAction.MOVE_TO_PENDING), | ||
| SafeDeleteModel( | ||
| name="InvestigationCellExecution", deletion_action=DeletionAction.MOVE_TO_PENDING | ||
| ), |
There was a problem hiding this comment.
Cell deletion migration cannot apply
High Severity
SafeDeleteModel renders the full migration state via from_state.apps.get_model before each pending delete. After InvestigationCellExecutionProject leaves state, InvestigationCellExecution.data_projects still points at that through model, and InvestigationCell / InvestigationCellExecution still hold circular FKs. The next SafeDeleteModel then fails to resolve those relations, so this migration cannot run. The AlterField operations only clear db_constraint; they do not remove the relations from state.
Reviewed by Cursor Bugbot for commit e7d46b7. Configure here.
|
This PR has a migration; here is the generated SQL for for --
-- Alter field investigation on investigationcell
--
SET CONSTRAINTS "investigations_inves_investigation_id_ea6f5f16_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcell" DROP CONSTRAINT "investigations_inves_investigation_id_ea6f5f16_fk_investiga";
--
-- Alter field content_execution on investigationcell
--
SET CONSTRAINTS "investigations_inves_content_execution_id_34f9e9e5_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcell" DROP CONSTRAINT "investigations_inves_content_execution_id_34f9e9e5_fk_investiga";
--
-- Alter field current_execution on investigationcell
--
SET CONSTRAINTS "investigations_inves_current_execution_id_05ba7f96_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcell" DROP CONSTRAINT "investigations_inves_current_execution_id_05ba7f96_fk_investiga";
--
-- Alter field result_execution on investigationcell
--
SET CONSTRAINTS "investigations_inves_result_execution_id_9eb02114_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcell" DROP CONSTRAINT "investigations_inves_result_execution_id_9eb02114_fk_investiga";
--
-- Alter field cell on investigationcellexecution
--
SET CONSTRAINTS "investigations_inves_cell_id_73cf2e60_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcellexecution" DROP CONSTRAINT "investigations_inves_cell_id_73cf2e60_fk_investiga";
--
-- Alter field seer_run on investigationcellexecution
--
SET CONSTRAINTS "investigations_inves_seer_run_id_c245a578_fk_seer_seer" IMMEDIATE; ALTER TABLE "investigations_investigationcellexecution" DROP CONSTRAINT "investigations_inves_seer_run_id_c245a578_fk_seer_seer";
--
-- Alter field execution on investigationcellexecutionproject
--
SET CONSTRAINTS "investigations_inves_execution_id_7b98d399_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcellexecutionproject" DROP CONSTRAINT "investigations_inves_execution_id_7b98d399_fk_investiga";
--
-- Alter field project on investigationcellexecutionproject
--
SET CONSTRAINTS "investigations_inves_project_id_448c181c_fk_sentry_pr" IMMEDIATE; ALTER TABLE "investigations_investigationcellexecutionproject" DROP CONSTRAINT "investigations_inves_project_id_448c181c_fk_sentry_pr";
--
-- Alter field cell on investigationcellparameter
--
SET CONSTRAINTS "investigations_inves_cell_id_461a689a_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcellparameter" DROP CONSTRAINT "investigations_inves_cell_id_461a689a_fk_investiga";
--
-- Alter field parameter on investigationcellparameter
--
SET CONSTRAINTS "investigations_inves_parameter_id_7c6be561_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcellparameter" DROP CONSTRAINT "investigations_inves_parameter_id_7c6be561_fk_investiga";
--
-- Alter field cell on investigationcelldependency
--
SET CONSTRAINTS "investigations_inves_cell_id_472eb484_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcelldependency" DROP CONSTRAINT "investigations_inves_cell_id_472eb484_fk_investiga";
--
-- Alter field depends_on on investigationcelldependency
--
SET CONSTRAINTS "investigations_inves_depends_on_id_628a1ebb_fk_investiga" IMMEDIATE; ALTER TABLE "investigations_investigationcelldependency" DROP CONSTRAINT "investigations_inves_depends_on_id_628a1ebb_fk_investiga";
--
-- Moved model InvestigationCellDependency to pending deletion state
--
-- (no-op)
--
-- Moved model InvestigationCellParameter to pending deletion state
--
-- (no-op)
--
-- Moved model InvestigationCellExecutionProject to pending deletion state
--
-- (no-op)
--
-- Moved model InvestigationCell to pending deletion state
--
-- (no-op)
--
-- Moved model InvestigationCellExecution to pending deletion state
--
-- (no-op) |


We switched the naming over to blocks, just removing these unused models.