Yet another primary key and migrations question

Wouldn't the lingo be:

"how to DRY out the above code?" :wink:

-Thufir