Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-07-27 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
-+-
 Reporter:  Mariusz Felisiak |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"3d9040a50b160f8b4bb580e09f4120d4979fe29e" 3d9040a5]:
 {{{
 #!CommitTicketReference repository=""
 revision="3d9040a50b160f8b4bb580e09f4120d4979fe29e"
 Refs #32743 -- Fixed recreation of foreign key constraints when altering
 type of referenced primary key with MTI.

 Follow up to 325d7710ce9f6155bb55610ad6b4580d31263557.
 }}}

-- 
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/065.1279b0f2a9852a291e207d0d6fd0ee35%40djangoproject.com.


Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-07-26 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
-+-
 Reporter:  Mariusz Felisiak |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Keryn Knight):

 There's an additional PR which been made which alludes to a situation
 missed by the original fix: https://github.com/django/django/pull/14700
 I can't speak for the veracity of it as I haven't been following the
 details of the ticket, but it's probably worth someone glancing at it and
 rolling it into this ticket's fix log if appropriate.

-- 
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/065.b0d8367a14578b41fe3b10f6fc7323be%40djangoproject.com.


Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-07-26 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
-+-
 Reporter:  Mariusz Felisiak |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  closed
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"325d7710ce9f6155bb55610ad6b4580d31263557" 325d7710]:
 {{{
 #!CommitTicketReference repository=""
 revision="325d7710ce9f6155bb55610ad6b4580d31263557"
 Fixed #32743 -- Added foreign key altering when altering type of
 referenced primary key with MTI.
 }}}

-- 
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/065.233045ab4f789fdd2cb9f432dff8c098%40djangoproject.com.


Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-07-26 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
-+-
 Reporter:  Mariusz Felisiak |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.2
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * stage:  Accepted => Ready for checkin


-- 
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/065.1120627635c5915f8a687cf34671dfcf%40djangoproject.com.


Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-07-24 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
-+-
 Reporter:  Mariusz Felisiak |Owner:  David
 |  Wobrock
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  3.2
 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)
 * owner:  nobody => David Wobrock
 * has_patch:  0 => 1
 * status:  new => assigned


Comment:

 PR: https://github.com/django/django/pull/14691

-- 
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/065.4f61668f5af998d5e53b20c77b3e713d%40djangoproject.com.


Re: [Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-05-13 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
--+
 Reporter:  Mariusz Felisiak  |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Migrations|  Version:  3.2
 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 Carlton Gibson):

 * stage:  Unreviewed => Accepted


-- 
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/065.22fcb8258271df6e3a2b57e2f23553d0%40djangoproject.com.


[Django] #32743: Migrations don't alter foreign key data types when referencing primary keys in MTI models.

2021-05-12 Thread Django
#32743: Migrations don't alter foreign key data types when referencing primary 
keys
in MTI models.
+
   Reporter:  Mariusz Felisiak  |  Owner:  nobody
   Type:  Bug   | Status:  new
  Component:  Migrations|Version:  3.2
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Migrations don't alter foreign key data types when referencing primary
 keys in MTI models, e.g.
 - before state:
 {{{
 class Parent(models.Model):
 pass


 class Child(Parent):
 pass


 class MainModel(models.Model):
 child = models.ForeignKey(Child, models.CASCADE)
 }}}
 - after state:
 {{{
 class Parent(models.Model):
 id = models.BigAutoField(primary_key=True)
 }}}

 `makemigrations` generates a single operation:
 {{{
 migrations.AlterField(
 model_name='parent',
 name='id',
 field=models.BigAutoField(primary_key=True, serialize=False),
 ),
 }}}
 which doesn't change `MainModel.child`'s datatype:
 {{{
 $ python manage.py sqlmigrate test_two 0002
 --
 -- Alter field id on parent
 --
 ALTER TABLE `test_two_child` DROP FOREIGN KEY
 `test_two_child_parent_ptr_id_537e8ba7_fk_test_two_parent_id`;
 ALTER TABLE `test_two_parent` MODIFY `id` bigint AUTO_INCREMENT NOT NULL;
 ALTER TABLE `test_two_child` MODIFY `parent_ptr_id` bigint NOT NULL;
 ALTER TABLE `test_two_child` ADD CONSTRAINT
 `test_two_child_parent_ptr_id_537e8ba7_fk` FOREIGN KEY (`parent_ptr_id`)
 REFERENCES `test_two_parent` (`id`);
 }}}

 and throws an error on MySQL:
 {{{
 MySQLdb._exceptions.OperationalError: (3780, "Referencing column
 'child_id' and referenced column 'parent_ptr_id' in foreign key constraint
 'test_two_mainmodel_child_id_3ca4683f_fk_test_two_' are incompatible.")
 }}}

 I couldn't find an existing ticket.

 Noticed when checking #32742.

-- 
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/050.28eb88b8e02e18ba903321988e9352b2%40djangoproject.com.