Added created_on field and index creation function