#35271: Old migrations with UniqueConstraint fail when using psycopg3
--------------------------------+--------------------------------------
     Reporter:  Adam Zahradník  |                    Owner:  nobody
         Type:  Bug             |                   Status:  closed
    Component:  Migrations      |                  Version:  5.0
     Severity:  Normal          |               Resolution:  invalid
     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 David Sanders):

 * resolution:   => invalid
 * stage:  Accepted => Unreviewed
 * status:  new => closed

Comment:

 Actually, on second thoughts:

 The problem here is the misunderstanding of using
 `UniqueConstraint(['field_1', 'field_2'])` - on psycopg2 this is
 interpreted as the literal `ARRAY['field_1'::text, 'field_2'::text']`.
 Which will fail for **any** value inserted into the table.

 Given this, I think this should be categorised as "Invalid" 👍
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35271#comment:3>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e0c5ffd30-e080619f-fc87-475d-86b1-3cbdbfe0891a-000000%40eu-central-1.amazonses.com.

Reply via email to