[Django] #30800: Altering field crashes for fields with custom db_type() on PostgreSQL.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #30800: Altering field crashes for fields with custom db_type() on PostgreSQL.

Django
#30800: Altering field crashes for fields with custom db_type() on PostgreSQL.
-------------------------------------+-------------------------------------
               Reporter:  felixxm    |          Owner:  felixxm
                   Type:  Bug        |         Status:  assigned
              Component:  Database   |        Version:  3.0
  layer (models, ORM)                |
               Severity:  Release    |       Keywords:
  blocker                            |
           Triage Stage:  Accepted   |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Altering field crashes for fields with a custom `db_type()` on PostgreSQL,
 e.g. `ArrayField`:
 {{{
     def db_type(self, connection):
         size = self.size or ''
         return '%s[%s]' % (self.base_field.db_type(connection), size)
 }}}

 Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7.

 {{{
   File "django/django/db/backends/postgresql/schema.py", line 72, in
 _alter_column_type_sql
     if self._field_data_type(old_field) !=
 self._field_data_type(new_field):
   File "django/django/db/backends/postgresql/schema.py", line 45, in
 _field_data_type
     return self.connection.data_types[field.get_internal_type()]
 KeyError: 'ArrayField'
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30800>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/050.0dbb5d3d04190e5cc40ddd2c0cf42fed%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30800: Altering field crashes for fields with custom db_type() on PostgreSQL.

Django
#30800: Altering field crashes for fields with custom db_type() on PostgreSQL.
-------------------------------------+-------------------------------------
     Reporter:  felixxm              |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               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 felixxm):

 * has_patch:  0 => 1


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/30800#comment:1>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.59f1c9db8a6290b7c3c4d7095af406ff%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30800: Altering field crashes for fields with custom db_type() on PostgreSQL.

Django
In reply to this post by Django
#30800: Altering field crashes for fields with custom db_type() on PostgreSQL.
-------------------------------------+-------------------------------------
     Reporter:  felixxm              |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               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:"580e644f24f1c5ae5b94784fb73a9953a178fd26" 580e644f]:
 {{{
 #!CommitTicketReference repository=""
 revision="580e644f24f1c5ae5b94784fb73a9953a178fd26"
 Fixed #30800 -- Fixed migrations crash when altering a field with custom
 db_type().

 Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30800#comment:2>
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.3646e3aaf73b61bca62ec369a98fc289%40djangoproject.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #30800: Altering field crashes for fields with custom db_type() on PostgreSQL.

Django
In reply to this post by Django
#30800: Altering field crashes for fields with custom db_type() on PostgreSQL.
-------------------------------------+-------------------------------------
     Reporter:  felixxm              |                    Owner:  felixxm
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Release blocker      |               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
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"1adf85d1687587b777f361f7831ebc0392f7127f" 1adf85d1]:
 {{{
 #!CommitTicketReference repository=""
 revision="1adf85d1687587b777f361f7831ebc0392f7127f"
 [3.0.x] Fixed #30800 -- Fixed migrations crash when altering a field with
 custom db_type().

 Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7.
 Backport of 580e644f24f1c5ae5b94784fb73a9953a178fd26 from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30800#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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.033169f1d78087232f95139bb41ec5ca%40djangoproject.com.