Run migration for links, add model

Wire it up to work with studies and add specs