migration to add index and changes
fix warnings as per rails best practices