Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2015-08-27 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 |  Honza_Kral
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

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


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


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2015-08-27 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 |  Honza_Kral
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"4f83bfa9e5ef10c6c9711ad529630d09a06ef413" 4f83bfa]:
 {{{
 #!CommitTicketReference repository=""
 revision="4f83bfa9e5ef10c6c9711ad529630d09a06ef413"
 [1.8.x] Refs #2495 -- Documented that MySQL cannot have
 TextField(unique=True).

 Backport of e8cbc2b322d873a6fe39faca18d340ce93035087 from master
 }}}

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


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2015-08-27 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 |  Honza_Kral
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"e8cbc2b322d873a6fe39faca18d340ce93035087" e8cbc2b]:
 {{{
 #!CommitTicketReference repository=""
 revision="e8cbc2b322d873a6fe39faca18d340ce93035087"
 Refs #2495 -- Documented that MySQL cannot have TextField(unique=True).
 }}}

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


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2015-08-24 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 |  Honza_Kral
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * Attachment "2495-doc.diff" 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 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/067.59485de9b409bb06fee506a669178620%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2015-08-24 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 |  Honza_Kral
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * needs_better_patch:  1 => 0


Comment:

 Attached a patch to document the limitation.

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


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2014-08-31 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 Type:  Bug  |  Honza_Kral
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 After eight years, and considering that the fix is far from easy, could we
 file this under "use a better database" and close the ticket?

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


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2013-12-19 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 Type:  Bug  |  Honza_Kral
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by anubhav9042):

 I think that this is a problem of MYSQL and not Django. MySQL does not
 stores the key length for longtext types. So its not possible to assign a
 fey specification before that. And that seems to be a bug of MySQL.

-- 
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/067.5b3ee46e64018ed5e2b174d633ef8c98%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2013-07-22 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
 Reporter:  anonymous|Owner:
 Type:  Bug  |  Honza_Kral
Component:  Database layer   |   Status:  new
  (models, ORM)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:  mysql TextField  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by eigenhombre):

 Just got bit by this, so here's my +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/067.ad68497487324ccb5da4ccf3fb299645%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-05-29 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
   Reporter:  anonymous  |  Owner:  Honza_Kral
   Type:  Bug| Status:  new
  Milestone:  1.3|  Component:  Database layer
Version:  SVN|  (models, ORM)
 Resolution: |   Severity:  Normal
   Triage Stage:  Accepted   |   Keywords:  mysql TextField
Needs documentation:  0  |  Has patch:  1
Patch needs improvement:  1  |Needs tests:  0
 |  Easy pickings:  0
-+-
Changes (by eigrad):

 * cc: eigrad (added)
 * easy:   => 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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-03-14 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
   Reporter:  anonymous  |Owner:  Honza_Kral
 Status:  new|Milestone:  1.3
  Component:  Database   |  Version:  SVN
  layer (models, ORM)| Keywords:  mysql TextField
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
-+-
Changes (by salgado):

 * needs_better_patch:  0 => 1


Comment:

 The patch from Honza_Kral doesn't actually fix the problem if you have
 unique=True, and after talking to andrewgodwin it turns out the fix for
 that is not trivial, so I'm leaving this for now.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-03-14 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
   Reporter:  anonymous  |Owner:  Honza_Kral
 Status:  new|Milestone:  1.3
  Component:  Database   |  Version:  SVN
  layer (models, ORM)| Keywords:  mysql TextField
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by salgado):

 Just noticed the test doesn't fail when I revert the changes, so the patch
 needs more work

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-03-14 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
   Reporter:  anonymous  |Owner:  Honza_Kral
 Status:  new|Milestone:  1.3
  Component:  Database   |  Version:  SVN
  layer (models, ORM)| Keywords:  mysql TextField
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-

Comment (by anonymous):

 Actually, the patch I just attached is missing a {{{__init.py}}} on the
 newly created directory; attaching a new one shortly

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-03-14 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
-+-
   Reporter:  anonymous  |Owner:  Honza_Kral
 Status:  new|Milestone:  1.3
  Component:  Database   |  Version:  SVN
  layer (models, ORM)| Keywords:  mysql TextField
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by anonymous):

 * needs_better_patch:  1 => 0


Comment:

 The two lines below in django/db/backends/postgresql/creation.py seem to
 be what changed and caused the patch to not apply cleanly anymore.

 13363   russellm 2010-06-21 07:48:45 -0400 (Mon, 21 Jun 2010)
 
style.SQL_TABLE(qn(truncate_name(index_name,self.connection.ops.max_name_length(
 + ' ' +[[BR]]
 [...][[BR]]
 13451   russellm 2010-07-29 22:54:47 -0400 (Thu, 29 Jul 2010)
 db_type = f.db_type(connection=self.connection)

 I'll attach an updated patch shortly

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2011-02-26 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
+---
   Reporter:  anonymous | Owner:  
Honza_Kral 
 Status:  new   | Milestone:  1.3   
 
  Component:  Database layer (models, ORM)  |   Version:  SVN   
 
 Resolution:|  Keywords:  mysql 
TextField
   Triage Stage:  Accepted  | Has patch:  1 
 
Needs documentation:  0 |   Needs tests:  0 
 
Patch needs improvement:  1 |  
+---
Changes (by lrekucki):

  * needs_better_patch:  0 => 1


Comment:

 Latest patch doesn't apply cleanly anymore.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2010-12-31 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone:  1.3

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by EmilStenstrom):

 * cc: e...@kth.se (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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2010-12-27 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone:  1.3

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by adamnelson):

 We up the patch from making the index on the first 255 bytes to 767 bytes
 if we marked this ticket as an enhancement for MySQL systems from 4.1.2
 and up and left behind MySQL 4.0 (version 4.1 came out 6 years ago).  IMHO
 this wouldn't break backwards compatibility since this never worked for
 anybody anyway and this code is only run when creating or altering the
 models.

 [http://dev.mysql.com/doc/refman/4.1/en/column-indexes.html MySQL 4.1
 Documentation]

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2010-11-08 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone:  1.3

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by chrischambers):

 * cc: chrischambers (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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2010-03-10 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone:  1.3

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * milestone:  1.2 => 1.3

Comment:

 Not critical for 1.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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-12-28 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone:  1.2

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by Honza_Kral):

  * milestone:  => 1.2

Comment:

 Marking for 1.2 to get some attention. I am happy to rewrite the
 patch/tests if something is missing on inadequate.

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-12-28 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by Honza_Kral):

 Replying to [comment:17 danny...@toldme.com]:
 > Hello,
 >
 > How do I replace the constraint with ALTER TABLE?
 > mysql> alter table events_tag add primary key(name);
 > ERROR 1170 (42000): BLOB/TEXT column 'name' used in key specification
 without a key length

 well, specify a key length:
 mysql> alter table events_tag add primary key(name(255));
 should work

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-12-04 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by danny...@toldme.com):

 A work-around is to use CharField instead of TextField.

 -danny

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-11-25 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Comment (by danny...@toldme.com):

 Hello,

 How do I replace the constraint with ALTER TABLE?

 My class boils down to:
 {{{
 class Tag(models.Model):
  name = models.TextField(max_length=32, primary_key=True)
  # Needed for syncdb.  See: http://code.djangoproject.com/ticket/2495
  #name = models.TextField(max_length=32)
 }}}

 So, I ran syncdb using the latter line, and it ran . . . now I'm in mysql
 . . .

 {{{
 mysql> describe events_tag;
 +---+--+--+-+-++
 | Field | Type | Null | Key | Default | Extra  |
 +---+--+--+-+-++
 | id| int(11)  | NO   | PRI | NULL| auto_increment |
 | name  | longtext | NO   | | NULL||
 +---+--+--+-+-++
 2 rows in set (0.01 sec)

 mysql> alter table events_tag add primary key(name);
 ERROR 1170 (42000): BLOB/TEXT column 'name' used in key specification
 without a key length
 mysql> alter table events_tag add unique key(name);
 ERROR 1170 (42000): BLOB/TEXT column 'name' used in key specification
 without a key length
 mysql> alter table events_tag add unique index(name);
 ERROR 1170 (42000): BLOB/TEXT column 'name' used in key specification
 without a key length
 }}}

 My main concern is that the tag name be unique.  Do I have to set that in
 MySQL, or will Django enforce this for me, or do I have to implement this
 check within the class?  (I already have a save method which does some
 sanity checking before a new tag can be added, so throwing a duplicate
 check in there aint a big deal . . .)

 Thanks!

 Sincerely,
 -daniel

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.




Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-06-05 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  Honza_Kral 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by Honza_Kral):

  * owner:  nobody => Honza_Kral
  * needs_better_patch:  1 => 0
  * needs_tests:  1 => 0

Comment:

 Added a new patch that have tests (failing without the patch) and more
 updated magic number. After discussing with jacob on #django-dev I only
 fixed the {{{db_index}}} property and not {{{unique}}} or
 {{{unique_together}}} since that doesn't make much sense for
 {{{TextField}}}s

 Please let me know it the approach taken in the patch is not welcome and I
 will update 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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-06-05 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  1 |  
---+
Changes (by Almad):

 * cc: Almad (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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-02-22 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  1 |  
---+
Changes (by mizatservercave):

 * cc: django-ticket-2...@codef0x.org (added)

Comment:

 For the record, I asked Django to install an index for me by setting a
 model.TextField like so:

 name = models.TextField(max_length=256, db_index=True)

 This made syncdb complain, so I hushed 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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-02-22 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  1  

Needs_docs:  0 |   Needs_tests:  1  

Needs_better_patch:  1 |  
---+
Changes (by mizatservercave):

  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1
  * needs_tests:  0 => 1

Comment:

 Patch(es) added.  For some reason Trac is reluctant to show the patch
 summary.

 This is a quick-n-dirty 'first-cut' at making models.TextField index-
 enabled when using MySQL.

 It has had only very basic testing done (syncdb works and MySQL shows an
 index installed).

 I suspect the method used in this patch can probably be improved upon
 greatly, and so I refer to this patch as a 'hack'.

 Tests are encouraged.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2009-01-08 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
---+
  Reporter:  anonymous | Owner:  nobody 

Status:  new   | Milestone: 

 Component:  Database layer (models, ORM)  |   Version:  SVN

Resolution:|  Keywords:  mysql 
TextField
 Stage:  Accepted  | Has_patch:  0  

Needs_docs:  0 |   Needs_tests:  0  

Needs_better_patch:  0 |  
---+
Changes (by martin):

 * cc: mar...@akoha.com (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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2007-01-10 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
--+-
 Reporter:  anonymous |Owner:  adrian
 Type:  defect|   Status:  new   
 Priority:  normal|Milestone:
Component:  Database wrapper  |  Version:
 Severity:  normal|   Resolution:
 Keywords:|  
--+-
Comment (by anonymous):

 Same problem here.  Any workaround in place?

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2006-08-07 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
--+-
 Reporter:  anonymous |Owner:  adrian
 Type:  defect|   Status:  new   
 Priority:  normal|Milestone:
Component:  Database wrapper  |  Version:
 Severity:  normal|   Resolution:
 Keywords:|  
--+-
Comment (by anonymous):

 errr... to be clear, the SQL I quoted is the working syntax, not what
 django generates.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~--~~~~--~~--~--~---



[Django] #2495: db.models.TextField cannot be marked unique when using mysql backend

2006-08-07 Thread Django
#2495: db.models.TextField cannot be marked unique when using mysql backend
--+-
 Reporter:  anonymous |   Owner:  adrian
 Type:  defect|  Status:  new   
 Priority:  normal|   Milestone:
Component:  Database wrapper  | Version:
 Severity:  normal|Keywords:
--+-
 When I used a field like this:
 {{{
 text = models.TextField(maxlength=2048, unique=True)
 }}}
 
 it results in the following sql error when the admin app goes to make the
 table
 {{{
 _mysql_exceptions.OperationalError: (1170, "BLOB/TEXT column 'text' used
 in key specification without a key length")
 }}}
 
 After a bit of investigation, it turns out that mysql refuses to use
 unique with the column unless it is only for an indexed part of the text
 field:
 {{{
 CREATE TABLE `quotes` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
 `text` longtext NOT NULL , `submitTS` datetime NOT NULL,
 `submitIP` char(15) NOT NULL, `approved` bool NOT NULL, unique
 (text(1000)));
 }}}
 Of course 1000 is just an arbitrary number I chose, it happens to be the
 maximum my database would allow.
 
 Not entirely sure how this can be fixed, but I figured it was worth
 mentioning.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~--~~~~--~~--~--~---