From 77f04b45c3ede8c8d29e10bd87eafa7abd9f43da Mon Sep 17 00:00:00 2001 From: Seth Wang Date: Mon, 29 Jul 2024 12:21:52 +0800 Subject: [PATCH] fix(migration): make migration compatible with django 3 and 4 --- .../migrations/0003_remove_user.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rest_framework_idempotency_key/migrations/0003_remove_user.py b/rest_framework_idempotency_key/migrations/0003_remove_user.py index eefd241..7e4253b 100644 --- a/rest_framework_idempotency_key/migrations/0003_remove_user.py +++ b/rest_framework_idempotency_key/migrations/0003_remove_user.py @@ -10,14 +10,19 @@ class Migration(migrations.Migration): ] operations = [ - migrations.RemoveField( + migrations.AlterField( model_name='idempotencykey', name='user', + field=models.IntegerField(null=True), ), migrations.RemoveConstraint( model_name='idempotencykey', name='Unique IdempotencyKey (user, idempotency_key)', ), + migrations.RemoveField( + model_name='idempotencykey', + name='user', + ), migrations.AddConstraint( model_name='idempotencykey', constraint=models.UniqueConstraint(