Re: [Django] #34219: Collation is not preserved when field is altered on PostgreSQL and MySQL.

10 views
Skip to first unread message

Django

unread,
Dec 21, 2022, 2:24:44 AM12/21/22
to django-...@googlegroups.com
#34219: Collation is not preserved when field is altered on PostgreSQL and MySQL.
-------------------------------------+-------------------------------------
Reporter: David Foster | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* Attachment "test-34219.diff" added.

Regression test.

--
Ticket URL: <https://code.djangoproject.com/ticket/34219>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 21, 2022, 5:55:23 AM12/21/22
to django-...@googlegroups.com
#34219: Collation is not preserved when field is altered on PostgreSQL and MySQL.
-------------------------------------+-------------------------------------
Reporter: David Foster | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: nobody => Mariusz Felisiak
* status: new => assigned


Comment:

I decided to work on this as we will have a similar issue with database
comments.

--
Ticket URL: <https://code.djangoproject.com/ticket/34219#comment:2>

Django

unread,
Dec 21, 2022, 7:18:23 AM12/21/22
to django-...@googlegroups.com
#34219: Collation is not preserved when field is altered on PostgreSQL and MySQL.
-------------------------------------+-------------------------------------
Reporter: David Foster | Owner: Mariusz
| Felisiak
Type: Bug | Status: assigned
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/16396 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34219#comment:3>

Django

unread,
Dec 22, 2022, 1:13:05 AM12/22/22
to django-...@googlegroups.com
#34219: Collation is not preserved when field is altered on PostgreSQL and MySQL.
-------------------------------------+-------------------------------------
Reporter: David Foster | Owner: Mariusz
| Felisiak
Type: Bug | Status: closed

Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"ae0899be0d787fbfc5f5ab2b18c5a8219d822d2b" ae0899b]:
{{{
#!CommitTicketReference repository=""
revision="ae0899be0d787fbfc5f5ab2b18c5a8219d822d2b"
Fixed #34219 -- Preserved Char/TextField.db_collation when altering column
type.

This moves setting a database collation to the column type alteration
as both must be set at the same time.

This should also avoid another layer of the column type alteration when
adding database comments support (#18468).
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34219#comment:4>

Reply all
Reply to author
Forward
0 new messages