#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.0dbb5d3d04190e5cc40ddd2c0cf42fed%40djangoproject.com.

Reply via email to