Fix bad merge from the master. Add the migration for the document