fix id generation

Some tables use assigned columns for primary keys.  Gorm got confused
 trying to treat them as auto increment columns and refused to create
  the tables properly.
Merge pull request #113 from metridoc/fix_ids

fix id generation