New script to create SQL to add permanent IDs