LPS-41025 Database migration fails with legacy database