removed the primary key and refactored the Rake file