Add primary_key for rails 3.1 compatability