Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2020-10-15 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
-+-
 Reporter:  Thomas Recouvreux|Owner:  Çağıl
 Type:   |  Uluşahin
  Cleanup/optimization   |   Status:  closed
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  migrations m2m   | Triage Stage:  Ready for
  mysql  |  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:"9159d173c3822312c653db7ff5b9a94b14af1dca" 9159d17]:
 {{{
 #!CommitTicketReference repository=""
 revision="9159d173c3822312c653db7ff5b9a94b14af1dca"
 Fixed #25253 -- Made AlterField operation a noop when changing attributes
 that don't affect the schema.
 }}}

-- 
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/066.f2d57015538877d745fa287774280776%40djangoproject.com.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2020-10-15 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
-+-
 Reporter:  Thomas Recouvreux|Owner:  Çağıl
 Type:   |  Uluşahin
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  migrations m2m   | Triage Stage:  Ready for
  mysql  |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  1 => 0
 * 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/066.f0c0ac94c72c30c3e56b15dd113d41c1%40djangoproject.com.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2020-10-03 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
-+-
 Reporter:  Thomas Recouvreux|Owner:  Çağıl
 Type:   |  Uluşahin
  Cleanup/optimization   |   Status:  assigned
Component:  Migrations   |  Version:  2.1
 Severity:  Normal   |   Resolution:
 Keywords:  migrations m2m   | Triage Stage:  Accepted
  mysql  |
Has patch:  0|  Needs documentation:  0
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Çağıl Uluşahin):

 * owner:  (none) => Çağıl Uluşahin
 * status:  new => assigned
 * needs_tests:  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/066.eee8438ab45d58800f2f1ae6a0413a8a%40djangoproject.com.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2020-03-14 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Adam (Chainz) Johnson):

 * cc: Adam (Chainz) Johnson (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/066.069bd26704edcf76a4c70369660a643b%40djangoproject.com.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2020-02-01 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Phil Krylov):

 * cc: Phil Krylov (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/066.743e63d32e0082cd379b6466bfb00025%40djangoproject.com.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2019-07-02 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  2.1
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by JR Heard):

 * version:  1.8 => 2.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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.4c992814eec0de6756b7a9477758b04d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2019-07-02 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by JR Heard):

 * status:  assigned => new
 * owner:  Shun Yu => (none)


Comment:

 The issue in this ticket is still happening for me on Django 2.1.9 on
 Postgres. Adding `blank=True` to a `ManyToManyField` drops the FK
 constraints on the join table and creates them back, exactly as described.

 This ticket hasn't been touched in a couple of years so I'm going to
 deassign it. I hope this is the right thing to do here, I'm new to the
 Django community :)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.958f03765d1ab6189e6b1aa483b43f97%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2019-03-19 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  Shun Yu
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by israel-tk):

 We had this problem with Postgres and Django 1.11 when deleting a not-null
 constraint in a ForeignKey field (adding null=True to a field). Instead of
 just dropping the not-null constraint which is a safe database operation,
 it first dropped the ForeignKey constraint, then dropped the not-null
 constraint, and last re-created the ForeignKey constraint (3 statements).

 Re-creating ForeignKey constraints locks tables and can generate downtime.
 Since we cannot afford the downtime we used a
 [https://docs.djangoproject.com/en/2.1/ref/migration-operations/#runsql
 RunSQL] migration operation with `state_operations` as a **workaround**:

 {{{
 migrations.RunSQL(
"""--
-- Alter field trip on payment
--
ALTER TABLE "app_payment" ALTER COLUMN "trip_id" DROP NOT NULL;
""",
state_operations=[
migrations.AlterField(
model_name='payment',
name='trip',
field=models.ForeignKey(blank=True, null=True,
 on_delete=django.db.models.deletion.PROTECT,
related_name='payments',
 to='app.Trip'),
),
])
 }}}

 This way we only apply the SQL we want and Django won't complain about the
 migration state not matching the current model. :)

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.63ffc7e38421f28440deb0d822c12523%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2018-05-07 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  Shun Yu
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Mike Edmunds):

 Still seems to be an issue in Django 2.0.5.

 The source of the problem appears to be
 BaseDatabaseSchemaEditor._alter_field in django.db.backends.base.schema.
 It ''unconditionally''
 
[https://github.com/django/django/blob/2.0.5/django/db/backends/base/schema.py#L530-L542
 drops any existing foreign key constraint(s)] and
 
[https://github.com/django/django/blob/2.0.5/django/db/backends/base/schema.py#L530-L542
 later re-creates it]—whether or not anything is changing. (It seems to be
 more selective about dropping other types of constraints only if the field
 is changing in a way that impacts them.) The
 
[https://github.com/django/django/commit/a92bae0f0622fb45afb94bf5448b49bc32ebb643
 origin of this code] is 2012, I think during initial implementation of
 Django migrations.

 Are there non-obvious field changes where the field's FK constraint needs
 to be dropped and re-created? Or some other reason this code runs
 unconditionally? Optimization around other field changes?

 A fix might be to defer dropping the FK constraint until just before the
 field's actions/null_actions/post_actions are collected and ready to be
 applied (around line 650), and then drop it only if there are actually
 actions to execute.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.780dd0a5206dc6eb5fd736b5d643ae6c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2017-10-21 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  Shun Yu
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Shun Yu):

 I have a pull request: https://github.com/django/django/pull/9269

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.446742f1bd9bedb3ab88c792623644b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2017-08-28 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  Shun Yu
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Shun Yu):

 Just for clarity, this seems to be a MySQL specific symptom. I tried using
 PostgreSQL 9.5.8 and Django 2.0.dev and could not replicate the add/drop
 of indices.

 {{{
 from django.db import models
 from django.contrib.auth.models import User

 class Banana(models.Model):
 - users = models.ForeignKey(User, on_delete=models.CASCADE)
 + users = models.ForeignKey(User, on_delete=models.PROTECT)
 }}}

 {{{
 class Migration(migrations.Migration):

 dependencies = [
 ('banana', '0001_initial'),
 ]

 operations = [
 migrations.AlterField(
 model_name='banana',
 name='users',
 field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
 to=settings.AUTH_USER_MODEL),
 ),
 ]
 }}}

 {{{
 $ python manage.py sqlmigrate --database mysql banana 0001
 BEGIN;
 --
 -- Create model Banana
 --
 CREATE TABLE `banana_banana` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY
 KEY, `users_id` integer NOT NULL);
 ALTER TABLE `banana_banana` ADD CONSTRAINT
 `banana_banana_users_id_b9f5715e_fk_auth_user_id` FOREIGN KEY (`users_id`)
 REFERENCES `auth_user` (`id`);
 COMMIT;

 $ python manage.py sqlmigrate --database mysql banana 0002
 BEGIN;
 --
 -- Alter field users on banana
 --
 ALTER TABLE `banana_banana` DROP FOREIGN KEY
 `banana_banana_users_id_b9f5715e_fk_auth_user_id`;
 ALTER TABLE `banana_banana` ADD CONSTRAINT
 `banana_banana_users_id_b9f5715e_fk_auth_user_id` FOREIGN KEY (`users_id`)
 REFERENCES `auth_user` (`id`);
 COMMIT;
 }}}

 {{{
 $ python manage.py sqlmigrate --database postgres banana 0001
 BEGIN;
 --
 -- Create model Banana
 --
 CREATE TABLE "banana_banana" ("id" serial NOT NULL PRIMARY KEY, "users_id"
 integer NOT NULL);
 ALTER TABLE "banana_banana" ADD CONSTRAINT
 "banana_banana_users_id_b9f5715e_fk_auth_user_id" FOREIGN KEY ("users_id")
 REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED;
 CREATE INDEX "banana_banana_users_id_b9f5715e" ON "banana_banana"
 ("users_id");
 COMMIT;

 $ python manage.py sqlmigrate --database postgres banana 0002
 BEGIN;
 --
 -- Alter field users on banana
 --
 COMMIT;
 }}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.1f1b7516e7c171280dd460932846858c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2017-08-17 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  Shun Yu
 Type:  Cleanup/optimization  |   Status:  assigned
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Shun Yu):

 * owner:  nobody => Shun Yu
 * 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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a2e8ea7b6994587b5b8beca16af6f623%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2017-07-26 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  Thomas Recouvreux |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by Cameron Dawson):

 I'm still hitting this with MySQL 5.7 and Django 1.11.3:

 {{{--
 -- Alter field job on textlogstep
 --
 ALTER TABLE `text_log_step` DROP FOREIGN KEY
 `text_log_step_job_id_698f3bfb_fk_job_id`;
 ALTER TABLE `text_log_step` ADD CONSTRAINT
 `text_log_step_job_id_698f3bfb_fk_job_id` FOREIGN KEY (`job_id`)
 REFERENCES `job` (`id`);}}}

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.6369070d0ee19d74447d44227c2b8775%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema

2016-04-25 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  trecouvr  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by piquadrat):

 For what it's worth, I'm also seeing this on PostgreSQL 9.1, Django 1.9.5
 and psycopg2 2.6.1. Specifically, adding an `on_delete` argument to a
 `ForeignKey` (but I was also able to reproduce it with just adding
 `blank=True`) and then running `sqlmigrate` on the generated migration
 results in this output:

 {{{
 BEGIN;
 --
 -- Alter field last_occurrence on event
 --
 ALTER TABLE "event_event" DROP CONSTRAINT
 "last_occurrence_id_refs_id_9b97c921";
 ALTER TABLE "event_event" ADD CONSTRAINT
 "event_event_last_occurrence_id_a6d9e0d9_fk_event_instance_id" FOREIGN KEY
 ("last_occurrence_id") REFERENCES "event_instance" ("id") DEFERRABLE
 INITIALLY DEFERRED;

 COMMIT;
 }}}

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.57ccd7a46f20fd0adf1ba1eb6472c21d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25253: MySQL migrations drop & recreate constraints unnecessarily when changing attributes that don't affect the schema (was: Migrations do unnecessary work when adding `blank=True` to M

2015-10-27 Thread Django
#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--+
 Reporter:  trecouvr  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Migrations|  Version:  1.8
 Severity:  Normal|   Resolution:
 Keywords:  migrations m2m mysql  | Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+

Comment (by timgraham):

 #25614 reported the same unnecessary dropping/adding of constraints when
 changing `ForeignKey.on_delete`. I assume that's a duplicate of this
 ticket, but please reopen it if fixing this issue doesn't also fix it.

--
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.6d3e6af2f96b4c000a54a0c6326f0d36%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.