Fixed #368 -- add model custom permissions in migration.