Fix db migration to v0.8 for Postgres
Merge branch 'devel' into v0.8-beta