Migrations: Improve dependency chain on postgres