Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres) (was: Migration fails when removing explicit primary key)

2024-04-30 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Sarah Boyce):

 * summary:  Migration fails when removing explicit primary key => Migration
 fails when removing explicit primary key (Postgres)

Comment:

 (Ah perhaps the fix as described is only related to Postgres? Can confirm
 the same migrations and prompting happen on other databases).
-- 
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/0107018f2e872bc1-ad00c365-7ac9-4447-b2ec-8868bcd25d8c-00%40eu-central-1.amazonses.com.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2024-04-18 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by bcail):

 * needs_better_patch:  1 => 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/0107018ef1bb2d2d-314ca744-e3de-45a4-80bf-da3a1945b01d-00%40eu-central-1.amazonses.com.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2024-04-12 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+
Changes (by Bhuvnesh):

 * 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/0107018ed13f7052-e53e627a-3b35-4207-a064-34f99430af21-00%40eu-central-1.amazonses.com.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2024-02-29 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | 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):

 I updated the PR to handle the other issue as well - to generate altered
 fields before added fields.
-- 
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/0107018df6cf74e4-ecdf0b16-fd72-4e61-9ec0-c479d7089d4a-00%40eu-central-1.amazonses.com.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2024-02-29 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  bcail
 Type:  Bug  |   Status:  assigned
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by bcail):

 * cc: bcail (added)
 * has_patch:  0 => 1
 * owner:  nobody => bcail
 * status:  new => assigned

Comment:

 I opened [https://github.com/django/django/pull/17923 a PR] for one of the
 problems - where a default is added to an AutoField.
-- 
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/0107018df6193738-6c2f24c5-a3a9-4c37-a317-a0bfaff835ec-00%40eu-central-1.amazonses.com.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2014-12-22 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | 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):

 #24030 seems related.

--
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/084.6e67202efbcd2e5ee8562bc6d2683101%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2014-12-18 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by timgraham):

 * version:  1.7-rc-1 => 1.7


--
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/084.de4a88cff7c0f69c619eb1d53f65d456%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22997: Migration fails when removing explicit primary key (Postgres)

2014-07-10 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
-+
 Reporter:  a.lloyd.flanagan@…   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Migrations   |  Version:  1.7-rc-1
 Severity:  Normal   |   Resolution:
 Keywords:  migrate primary_key  | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by timo):

 * needs_better_patch:   => 0
 * component:  Database layer (models, ORM) => Migrations
 * needs_tests:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 I guess it's probably too much of an edge case to be a blocker for 1.7,
 but would be nice if it "just worked".

-- 
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/084.a806293277810f9dd2ff8858a3fa1e45%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #22997: Migration fails when removing explicit primary key (Postgres)

2014-07-10 Thread Django
#22997: Migration fails when removing explicit primary key (Postgres)
--+
 Reporter:  a.lloyd.flanagan@…|  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Database layer (models, ORM)  |Version:  1.7-rc-1
 Severity:  Normal|   Keywords:  migrate
 Triage Stage:  Unreviewed|  primary_key
Easy pickings:  0 |  Has patch:  0
  |  UI/UX:  0
--+
 The automatic migration created by migrate fails when

 * a table was created with a field where "primary_key=True" is specified.
 * data is added to the table
 * The model is modified so that no field is primary key, and Django auto-
 creates "id" field.

 To reproduce the problem:

 1. create new model, set some field as primary key
 2. set up migrations with initial migration
 3. modify model so field is not primary key
 4. generate migration

 Problems:

 * will ask for default value for auto-generated ID field
 * will try to create id field as primary key, before modifying existing
 key

 Manual Fix:

 * remove default from models.AutoField() call
 * reverse order of operations so AlterField() comes before AddField()

 I'm attaching a session log with a complete transcript.

-- 
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/069.77eaaa7bf200623dbcf94b434294bcbd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.