Re: [Django] #24934: Can't drop or change unique_together index

2015-06-13 Thread Django
#24934: Can't drop or change unique_together index
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:  fixed
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--

Comment (by timgraham):

 Did you resolve the issue? (not sure why the ticket was marked "fixed").
 #24972 seems to report the same or similar issue.

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


Re: [Django] #24934: Can't drop or change unique_together index

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  closed
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:  fixed
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by user0007):

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


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


Re: [Django] #24934: Can't drop or change unique_together index (was: Can't drop or change unique_together index in MySql)

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
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 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.07703f3c25626f17bec18085d284c9c4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24934: Can't drop or change unique_together index in MySql

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index in MySql
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Description changed by user0007:

Old description:

> Hello,
>
> I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
> unique_together:
>

> {{{
> user = models.ForeignKey(User)
> product = models.ForeignKey(Product)
>
> class Meta:
> unique_together = ('user', 'product')
> }}}
>
> the table was created successfully with following indexes:
>
> {{{
> PRIMARY |1 | id
> myapp_mymodel_user_id_16c33dde7f7257bb_uniq |1 | user_id
> myapp_mymodel_user_id_16c33dde7f7257bb_uniq |2 | product_id
> myapp_mymodel_1ba366c5  |1 | user_id
> myapp_mymodel_9bea82de  |1 | product_id
> }}}
>
> Later I removed unique_together from my model:
>
> {{{
> class Meta:
> pass
> }}}
>
> so Django generated a migration:
>
> {{{
> operations = [
> migrations.AlterUniqueTogether(
> name='mymodel',
> unique_together=set([]),
> ),
> ]
> }}}
>
> but when i try to apply this migrattion I have got an error:
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}
>
> Django is trying to create this index, instead of removed them.
>
> The same situation is when I try to add third field to my unique_together
> list:
>
> {{{
> class Meta:
> unique_together = ('user', 'product', 'category')
> }}}
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}

New description:

 Hello,

 I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
 unique_together:


 {{{
 user = models.ForeignKey(User)
 product = models.ForeignKey(Product)

 class Meta:
 unique_together = ('user', 'product')
 }}}

 the table was created successfully with following indexes:

 {{{
 PRIMARY |1 | id
 myapp_mymodel_user_id_16c33dde7f7257bb_uniq |1 | user_id
 myapp_mymodel_user_id_16c33dde7f7257bb_uniq |2 | product_id
 myapp_mymodel_1ba366c5  |1 | user_id
 myapp_mymodel_9bea82de  |1 | product_id
 }}}

 Later I removed unique_together from my model:

 {{{
 class Meta:
 pass
 }}}

 so Django generated a migration:

 {{{
 operations = [
 migrations.AlterUniqueTogether(
 name='mymodel',
 unique_together=set([]),
 ),
 ]
 }}}

 but when i try to apply this migrattion I have got an error:

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

 Django is trying to create this index, instead of removed them.

 The same situation is when I try to add third field to my unique_together
 list:

 {{{
 class Meta:
 unique_together = ('user', 'product', 'category')
 }}}

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

 PS. The table was created using Django 1.7.X but changes was made using
 Django 1.8.2

--

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


Re: [Django] #24934: Can't drop or change unique_together index in MySql

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index in MySql
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Description changed by user0007:

Old description:

> Hello,
>
> I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
> unique_together:
>

> {{{
> class Meta:
> unique_together = ('user', 'product')
> }}}
>
> the table was created successfully. Later I removed unique_together from
> my model:
>
> {{{
> class Meta:
> pass
> }}}
>
> so Django created migration:
>
> {{{
> operations = [
> migrations.AlterUniqueTogether(
> name='mymodel',
> unique_together=set([]),
> ),
> ]
> }}}
>
> but when i try to apply this migrattion I have got an error:
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}
>
> Django is trying to create this index, instead of removed them.
>
> The same situation is when I try to add third field to my unique_together
> list:
>
> {{{
> class Meta:
> unique_together = ('user', 'product', 'category')
> }}}
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}

New description:

 Hello,

 I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
 unique_together:


 {{{
 user = models.ForeignKey(User)
 product = models.ForeignKey(Product)

 class Meta:
 unique_together = ('user', 'product')
 }}}

 the table was created successfully with following indexes:

 {{{
 PRIMARY |1 | id
 myapp_mymodel_user_id_16c33dde7f7257bb_uniq |1 | user_id
 myapp_mymodel_user_id_16c33dde7f7257bb_uniq |2 | product_id
 myapp_mymodel_1ba366c5  |1 | user_id
 myapp_mymodel_9bea82de  |1 | product_id
 }}}

 Later I removed unique_together from my model:

 {{{
 class Meta:
 pass
 }}}

 so Django generated a migration:

 {{{
 operations = [
 migrations.AlterUniqueTogether(
 name='mymodel',
 unique_together=set([]),
 ),
 ]
 }}}

 but when i try to apply this migrattion I have got an error:

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

 Django is trying to create this index, instead of removed them.

 The same situation is when I try to add third field to my unique_together
 list:

 {{{
 class Meta:
 unique_together = ('user', 'product', 'category')
 }}}

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

--

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


Re: [Django] #24934: Can't drop or change unique_together index in MySql

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index in MySql
+--
 Reporter:  user0007|Owner:  nobody
 Type:  Bug |   Status:  new
Component:  Migrations  |  Version:  1.8
 Severity:  Normal  |   Resolution:
 Keywords:  | Triage Stage:  Unreviewed
Has patch:  0   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  0
Easy pickings:  0   |UI/UX:  0
+--
Changes (by user0007):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> Hello,
>
> I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
> unique_together:
>

> {{{
> class Meta:
> unique_together = ('user', 'product')
> }}}
>
> the table was created sucessfully. Later I removed unique_together:
>
> {{{
> class Meta:
> pass
> }}}
>
> so Django created migration:
>
> {{{
> operations = [
> migrations.AlterUniqueTogether(
> name='mymodel',
> unique_together=set([]),
> ),
> ]
> }}}
>
> but when i try to apply this migrattion I have got an error:
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}
>
> Django is trying to create this index, instead of removed them.
>
> The same situation is when I try to add third field to my unique_together
> list:
>
> {{{
> class Meta:
> unique_together = ('user', 'product', 'category')
> }}}
>
> {{{
> django.db.utils.OperationalError: (1061, "Duplicate key name
> 'myapp_mymodel_1ba366c5'")
> }}}

New description:

 Hello,

 I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
 unique_together:


 {{{
 class Meta:
 unique_together = ('user', 'product')
 }}}

 the table was created successfully. Later I removed unique_together from
 my model:

 {{{
 class Meta:
 pass
 }}}

 so Django created migration:

 {{{
 operations = [
 migrations.AlterUniqueTogether(
 name='mymodel',
 unique_together=set([]),
 ),
 ]
 }}}

 but when i try to apply this migrattion I have got an error:

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

 Django is trying to create this index, instead of removed them.

 The same situation is when I try to add third field to my unique_together
 list:

 {{{
 class Meta:
 unique_together = ('user', 'product', 'category')
 }}}

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

--

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


[Django] #24934: Can't drop or change unique_together index in MySql

2015-06-05 Thread Django
#24934: Can't drop or change unique_together index in MySql
+
 Reporter:  user0007|  Owner:  nobody
 Type:  Bug | Status:  new
Component:  Migrations  |Version:  1.8
 Severity:  Normal  |   Keywords:
 Triage Stage:  Unreviewed  |  Has patch:  0
Easy pickings:  0   |  UI/UX:  0
+
 Hello,

 I'm using Django 1.8.2 and Mysql 5.6. I created model with two fields in
 unique_together:


 {{{
 class Meta:
 unique_together = ('user', 'product')
 }}}

 the table was created sucessfully. Later I removed unique_together:

 {{{
 class Meta:
 pass
 }}}

 so Django created migration:

 {{{
 operations = [
 migrations.AlterUniqueTogether(
 name='mymodel',
 unique_together=set([]),
 ),
 ]
 }}}

 but when i try to apply this migrattion I have got an error:

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

 Django is trying to create this index, instead of removed them.

 The same situation is when I try to add third field to my unique_together
 list:

 {{{
 class Meta:
 unique_together = ('user', 'product', 'category')
 }}}

 {{{
 django.db.utils.OperationalError: (1061, "Duplicate key name
 'myapp_mymodel_1ba366c5'")
 }}}

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