Code

Opened 7 years ago

Closed 7 years ago

#3133 closed defect (worksforme)

Database instrospection fails to detect autoincrement fields in MySQL

Reported by: jwm@… Owned by: adrian
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: UI/UX:

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.)

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to worksforme
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


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

 
Note: See TracTickets for help on using tickets.