Very important fix: Added better support for automatic generating of indexes and foreignkeys with innodb