Added migration for new fields added to the attribute model to implement the statistical stuff in #763.