Opened 18 years ago

Closed 17 years ago

#3133 closed defect (worksforme)

Database instrospection fails to detect autoincrement fields in MySQL

Reported by: jwm@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Database introspection fails to detect the auto_increment extra option on columns in MySQL databases. This is especially problematic for primary keys as the generated model will work, but the save method won't grab the newly assigned primary key, which is necessary for subsequent delete calls, for example.

I've tested this against MyISAM and InnoDB tables, which both exhibit the same behaviour, though this is not suprising and the engine details are almost entirely abstracted away at the SQL interaction level.

(I note that unsigned and small integer primary keys aren't well detected, either, but that seams like an almost trival point.)

Change History (1)

comment:1 by Simon G. <dev@…>, 17 years ago

Resolution: worksforme
Status: newclosed

It seems to work for me now - can you confirm if this is still a problem?

Note: See TracTickets for help on using tickets.
Back to Top