Script to populate the database with historic data