Ticket #833 (assigned defect)

Opened 4 years ago

Last modified 4 years ago

add_column with an autofield fails

Reported by: Terry Brown <terry_n_brown@…> Owned by: andrew
Priority: minor Milestone: 1.0
Component: commands Version: 0.7.3
Keywords: primary key Cc:

Description (last modified by andrew) (diff)

In the db.add_column() generated by manage.py schemamigration you get a default=0 or whatever you choose, but postgresql complains about multiple default values, probably because it's adding a SERIAL field which has an implicit default.

Change History

comment:1 Changed 4 years ago by Terry Brown <terry_n_brown@…>

"renaming" -> "remove and replace"

comment:2 Changed 4 years ago by andrew

  • Status changed from new to assigned
  • Description modified (diff)
  • Summary changed from renaming a primary key on postgresql generates multiple defaults to add_column with an autofield fails

Retitling this to a correct description; renaming in general is broken, so the presence of add/remove is in itself another bug.

Note: See TracTickets for help on using tickets.