From c158b46b0723d55da1757bbfb0b729e33e80112c Mon Sep 17 00:00:00 2001 From: "Alexis A." Date: Wed, 18 Dec 2024 13:35:06 +0100 Subject: [PATCH] squash me --- utils/schema.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/utils/schema.py b/utils/schema.py index 640d60c04..35503094f 100644 --- a/utils/schema.py +++ b/utils/schema.py @@ -28,10 +28,6 @@ class NotInTestEnvironmentError(Exception): def drop_and_create_model(model, schema_editor: BaseDatabaseSchemaEditor) -> None: - sql = f"DROP TABLE IF EXISTS {model._meta.db_table} CASCADE;" - for field in model._meta.local_many_to_many: - sql += f"DROP TABLE IF EXISTS {field.remote_field.through._meta.db_table} CASCADE;" - schema_editor.execute(sql) schema_editor.create_model(model)