Modify

Ticket #464 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Trying to alter column to None type

Reported by: tomwys@… Owned by: andrew
Priority: major Milestone: 0.7.2
Component: databaseapi Version: 0.7
Keywords: Cc:

Description

If field.db_type() in south.db.generic._db_type_for_alter_column returns None south tries to alert column type to "None".

This problem occurs when trying to make any change to django.contrib.gis.db.models.fields.PointField? field.

Example code:

db.alter_column(
    'foo',
    'bar',
    self.gf('django.contrib.gis.db.models.fields.PointField')(null=True, blank=True)
)

Patch:

332d331
<         sqls = []
334,335c333
<         if params["type"] is not None:
<             sqls.append((self.alter_string_set_type % params, []))
---
>         sqls = [(self.alter_string_set_type % params, [])]

Attachments

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7.2

comment:2 Changed 4 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in [1eba1b31fde0].

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.