Rebuilt the models from new database structure.