Migration of PostgreSQL or SQLite stores weren't working because of incorrect code