pvanek / sqliteman

http://sqliteman.com/
160 stars 58 forks source link

Fix issue #153 #3

Closed vaussard closed 10 years ago

vaussard commented 10 years ago

Issue #153 [1] is annoying when altering tables, as the PRIMARY KEY and AUTOINCREMENT keywords are lost, which may in turn cause bugs when using the altered table. The first patch fixes this issue, by correctly updating field.type in Database::tableFields().

Users of this function were checked, and it appears that SqlTableModel::setTable() was wrongly detecting the AUTOINCREMENT nature of a primary key (used for the tooltip of the table view), so this side issue is fixed in the second patch by using results from the first patch.

Tested on Linux with a few toys databases, as well as with a "real" one.

Regards.

Florian

[1] http://bugtracker.sqliteman.com/view.php?id=153

pvanek commented 10 years ago

thanks a lot. Also please feel free to hack more ;)