Fix migrations

Please, take a look at this PR. I noticed, that application is broken now. If I want to install in, migrations fails. So, here is a little fix for this issue.