Fix db migration to v0.8 for Postgres