SQL to create the database and generate UUIDs in python