Sometime ago I created a model with some choices:
class MyEnum(StrEnum):
CREATE = "create"
DELETE = "delete"
class ShareHistory(models.Model):
action = models.TextField(choices=MyEnum.get_choices())
created_at = models.DateTimeField(auto_now_add=True, auto_created=True)
After some time I understood that I don’t need that model. So I can just remove the class, run makemigrations
, then run migrate
and that is all, the table is gone.
But I want to remove the choices too (MyEnum
). If I do that the next time someone runs the migrations from scratch will receive an error, because the initial migration needs MyEnum
. Is there a way to remove that?