Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2024-07-12 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  Bhuvnesh
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Sarah Boyce):

 * needs_better_patch:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190a5d7ce9c-e48ab34f-f3b3-474f-8b76-b060578c9411-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2024-02-05 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  Bhuvnesh
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Comment (by Mariusz Felisiak):

 Replying to [comment:17 bcail]:
 > Is there anything I can do to help move this forward? The PR seems to
 handle this case, and create the correct optimization, and the author
 responded to the last comment on the PR. Is it being held up on the
 question about multiple apps?

 It's waiting for a review, you can
 [https://docs.djangoproject.com/en/5.0/internals/contributing/writing-code
 /submitting-patches/#patch-review-checklist review it] if you want to
 help.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d7a5c9da2-1fac3270-4e8e-44de-8c5c-b520b414eacb-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2024-02-05 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  Bhuvnesh
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Comment (by bcail):

 Is there anything I can do to help move this forward? The PR seems to
 handle this case, and create the correct optimization, and the author
 responded to the last comment on the PR. Is it being held up on the
 question about multiple apps?
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d7a41529d-e8e07252-375f-4c12-b9ba-c0bb9528bc6f-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2023-10-01 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  Bhuvnesh
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by David Wobrock):

 * cc: David Wobrock (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018aebe2d944-f817860e-b7a4-4358-8a82-eb5f75169314-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2023-09-13 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  Bhuvnesh
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Bhuvnesh):

 * owner:  Anvesh Mishra => Bhuvnesh
 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/17257 PR]
 Thanks to Durval Carvalho for a basic idea.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018a8f610550-cb4df29a-466d-43b5-bff3-b1e2896b9747-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2023-03-24 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Durval Carvalho):

 I tried to deal with this problem as follows. In the CreateModel.reduce
 function, when executed with a RenameModel operation, I check if the
 CreateModel operation has any fields that may have been impacted by the
 RenameModel operation, because in this scenario, these fields need to be
 updated for this renamed model.


 {{{

 def reduce(self, operation, app_label):
 ...
 elif impacted_fields := [
 (_, field)
 for _, field in self.fields
 if field.remote_field
 and field.remote_field.model ==
 f'{app_label}.{operation.old_name_lower}'
 ]:
 not_impacted_fields = [
 (_, field)
 for (_, field) in self.fields
 if (_, field) not in impacted_fields
 ]

 fixed_fields = []

 for (_, impacted_field) in impacted_fields:
 name, path, args, kwargs = impacted_field.deconstruct()
 kwargs['to'] = f'{app_label}.{operation.new_name_lower}'
 impacted_field = impacted_field.__class__(*args, **kwargs)
 fixed_fields.append((_, impacted_field))

 return [
 CreateModel(
 self.name,
 fields=not_impacted_fields + fixed_fields,
 bases=self.bases,
 managers=self.managers,
 ),
 ]
 ...
 }}}

 However, this approach did not work for the following reason. When the
 CreateModel operation is executed with its respective RenameModel, both
 are reduced to the new CreateModel operation. Then, some checks are made
 to decide whether this new resulting operation will be added to the list
 of new operations. But with this new reduction that I created, the other
 CreateModel operations, the ones that reference the renamed model, are
 also reduced, and this breaks the verification described below.

 {{{
 ...
 for i, operation in enumerate(operations):
 right = True  # Should we reduce on the right or on the left.
 # Compare it to each operation after it
 for j, other in enumerate(operations[i + 1 :]):
 result = operation.reduce(other, app_label)
 if isinstance(result, list):
 in_between = operations[i + 1 : i + j + 1]
 if right:
 new_operations.extend(in_between)
 new_operations.extend(result)
 elif all(op.reduce(other, app_label) is True for op in
 in_between): # <<< This condition fails (I didn't understand what is
 being checked here)
 # Perform a left reduction if all of the in-
 between
 # operations can optimize through other.
 new_operations.extend(result)
 new_operations.extend(in_between)
 else:
 #  New operation `result` is not added to new operations list
 # Otherwise keep trying.
 new_operations.append(operation)
 break
 ...
 }}}


 Now I am stuck, trying to think of a way to work around this problem.
 Do any of you have any suggestions?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018715968041-0619c62c-bdda-4be2-9c9b-11f2fe328c16-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-11-23 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Anvesh Mishra):

 A regression test for this ticket would look something like this:
 {{{#!python
 def test_squashmigrations_rename_foreign_key(self):

 out = io.StringIO()
 with self.temporary_migration_module(
 module="migrations.test_migrations_rename"
 ) as migration_dir:
 call_command(
 "squashmigrations",
 "migrations",
 "0003",
 interactive=False,
 stdout=out,
 no_color=True,
 )
 squashed_migration_file = os.path.join(
 migration_dir, "0001_squashed_0003_third.py"
 )
 with open(squashed_migration_file, encoding="utf-8") as fp:
 content = fp.read()
 self.assertIn('to="migrations.person"',content)
 self.assertTrue(os.path.exists(squashed_migration_file))
 self.assertEqual(
 out.getvalue(),
 f"Will squash the following migrations:\n"
 f" - 0001_initial\n"
 f" - 0002_second\n"
 f" - 0003_third\n"
 f"Optimizing...\n"
 f"  Optimized from 4 operations to 2 operations.\n"
 f"Created new squashed migration {squashed_migration_file}\n"
 f"  You should commit this migration but leave the old ones in
 place;\n"
 f"  the new migration will be used for new installs. Once you
 are sure\n"
 f"  all instances of the codebase have applied the migrations
 you "
 f"squashed,\n"
 f"  you can delete them.\n",
 )
 }}}
 By running this test I found out that the base migration objects created
 are of `CreateModel` so we need to somehow change the functionality of
 this section of `CreateModel.reduce()`:
 {{{#!python
 def reduce(self,operation,app_label):
 ...
 elif (
 isinstance(operation, RenameModel)
 and self.name_lower == operation.old_name_lower
 ):
 return [
 CreateModel(
 operation.new_name,
 fields=self.fields,
 options=self.options,
 bases=self.bases,
 managers=self.managers,
 ),
 ]
 }}}
 to something like:
 {{{#!python
 def reduce(self,operation,app_label):
 ...
 elif (
 isinstance(operation, RenameModel)
 and self.name_lower == operation.old_name_lower
 ):
 return operation.reduce(operation,app_label)
 }}}
 and changing the functionality of `RenameModel.reduce()`. I hope I'm
 clear.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184a64e6dd9-8bc9b483-03fa-4c85-8e15-d484a37c7a58-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-11-09 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Anvesh Mishra):

 After the squashed migration is created if we run `makemigrations` once
 again it creates a new migrations file as such:
 {{{#!python
 class Migration(migrations.Migration):

 dependencies = [
 ("test_one", "0001_squashed_0003_person_birthdate"),
 ]

 operations = [
 migrations.AlterField(
 model_name="book",
 name="author",
 field=models.ForeignKey(
 on_delete=django.db.models.deletion.PROTECT,
 to="test_one.person"
 ),
 ),
 ]
 }}}
 so the `to` field automatically gets referenced to the right table in the
 new migrations file but still it won't work cause of the previous sqaushed
 migration.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070184606eb5e1-37437ba8-4aa1-4826-8052-a65d0f64341a-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-10-06 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Anvesh Mishra):

 Tried running around the files, the first problem that was the creation of
 model with `ForeignKey` before the target of `ForeignKey` seems to be
 resolved due to some previous patches I guess. For the second problem it
 seems that the `RenameModel` misses the functionality where it needs to
 change the `to` parameter of the `ForeignKey` model. the
 `RenameModel.reduce()` doesn't seems to be getting called here.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070183b0b9dd4d-e6d1079e-f5a6-4b6f-b833-5b0042f7b1e6-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-09-28 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Bhuvnesh):

 * cc: Bhuvnesh (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018385d4fe6f-54cb1c52-5a6b-49df-9220-7b8d81a19d48-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-09-26 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Anvesh Mishra):

 Replying to [comment:7 Simon Charette]:
 > Feels like it's the same class of issue as #32256 but for `RenameModel`
 instead of `RenameField` (7c18b22e2fa70aa8dcfadb33beb17933abdf7ee4)
 >
 >
 
https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/db/migrations/operations/models.py#L425-L430

 Tried doing the same with `RenameModel.reduce()` dosen't seem to be
 working might have to look out for something else.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701837b23663f-67a9b657-ad6d-4027-a88d-45654205b39d-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2022-09-22 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
-+-
 Reporter:  InvalidInterrupt |Owner:  Anvesh
 |  Mishra
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Anvesh Mishra):

 * owner:  (none) => Anvesh Mishra


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070183665e1985-5b4a150e-71e1-49fd-9c95-e59fb9e2bb35-00%40eu-central-1.amazonses.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2021-02-28 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  (none)
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Simon Charette):

 Feels like it's the same class of issue as #32256 but for `RenameModel`
 instead of `RenameField` (7c18b22e2fa70aa8dcfadb33beb17933abdf7ee4)

 
https://github.com/django/django/blob/64a0d1ef6e7a6739148996e9584bbb61fe3dcc60/django/db/migrations/operations/models.py#L425-L430

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.cddc3efdea63e2e3eaf227e90875f73a%40djangoproject.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2021-02-28 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  (none)
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by gasparb16):

 * owner:  gasparb16 => (none)


Comment:

 I have played with this for a while but I am not sure if this can be
 solved without a larger scale code change.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.c7d0cc8bc5a4b94e9f57e8ec045707c3%40djangoproject.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2021-02-28 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+-
 Reporter:  InvalidInterrupt  |Owner:  gasparb16
 Type:  Bug   |   Status:  assigned
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+-
Changes (by gasparb16):

 * owner:  nobody => gasparb16
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.f2a6eb1709dc0ab8f4e9b57928b59e64%40djangoproject.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target.

2020-12-15 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by ADI33352):

 You'll have to change the order of your save and assignment operations, or
 do the extra assignment. it might help

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.108e334664e93874d4546147e29f8ec2%40djangoproject.com.


Re: [Django] #32263: squashmigrations produces incorrect result with a RenameModel on a ForeignKey target. (was: squashmigrations produces incorrect result when a RenameModel operation is performed on

2020-12-13 Thread Django
#32263: squashmigrations produces incorrect result with a RenameModel on a
ForeignKey target.
--+
 Reporter:  InvalidInterrupt  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Migrations|  Version:  3.1
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.1acab644a7973dacdd4b9a21b885b7e8%40djangoproject.com.