Fix PostgreSQL migration