Migrate temp tables to new models